Class Energizer
java.lang.Object
edu.uoc.pacman.model.entities.Entity
edu.uoc.pacman.model.entities.items.MapItem
edu.uoc.pacman.model.entities.items.Energizer
Represents an energizer in the labyrinth/map.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class edu.uoc.pacman.model.entities.Entity
getPosition, getSprite, isPathable, setPathable, setPosition, setSprite
-
Field Details
-
picked
private boolean pickedThis attribute allows us to manage if the energizer has been picked or not. Its initial/default value isfalse
. -
POINTS
private static final int POINTSThis attribute stores the amount of points that the energizer gives.- See Also:
-
-
Constructor Details
-
Energizer
Constructor with argument.
The value forpathable
istrue
and forsprite
isSprite.ENERGIZER
.- Parameters:
position
- The position where the energizer is.
-
-
Method Details
-
isPicked
public boolean isPicked()Getter of the attributepicked
. -
setPicked
public void setPicked(boolean picked) Setter of the attributepickled
. -
getPoints
public int getPoints()Getter of the attributePOINTS
.
-