Class Life
java.lang.Object
edu.uoc.pacman.model.entities.Entity
edu.uoc.pacman.model.entities.items.MapItem
edu.uoc.pacman.model.entities.items.Life
- All Implemented Interfaces:
Pickable
Represents a life in the labyrinth/map.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
This attribute allows us to manage if the life has been picked or not. -
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 life has been picked or not. Its initial/default value isfalse
.
-
-
Constructor Details
-
Life
Constructor with argument.
The value forpathable
istrue
and forsprite
isSprite.LIFE
.- Parameters:
position
- The position where the life is.
-
-
Method Details
-
isPicked
public boolean isPicked()Getter of the attributepicked
. -
setPicked
public void setPicked(boolean picked) Setter of the attributepickled
.
-