public class Litter extends Interactable implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
(package private) int |
imgID
Number generated randomly that later maps to A SpriteID to paint it with.
|
(package private) LitterType |
lType
Enum from LitterType that represents the type of Litter this object is
|
height, width, xLocation, yLocation
Constructor and Description |
---|
Litter()
Constructor for all Litter objects.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Overridden equals method.
|
int |
getImgID()
Method that returns the imgID that is used to map the litter object to its Sprite in View.
|
LitterType |
getType()
Returns this Litter object's lType attribute that represents the kind of Litter it is.
|
int |
hashCode()
Overridden hashCode function that hashes the Litter object by its xLocation on the map.
|
void |
setImgID(int i)
Method that sets the imgID of a Litter object that is used to map the object to an appropriate Litter Sprite in View.
|
void |
setType(LitterType lt)
Sets this Litter object's lType attribute that represents the kind of Litter it is.
|
addXLocation, addYLocation, getCollidesWith, getCollisionRect, getHeight, getWidth, getXLocation, getYLocation, setRelativeCollisionRect, setXLocation, setYLocation
int imgID
LitterType lType
public Litter()
public void setImgID(int i)
i
- that will represent the imgID of the Litter object in game.public int getImgID()
None.
- public void setType(LitterType lt)
lt
- A value of the Enum LitterType that will represent the kind of Litter of this object.public LitterType getType()
None.
- public int hashCode()
hashCode
in class java.lang.Object
None.
- public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
None.
-