Class CollectableAreaEntity
java.lang.Object
ch.epfl.cs107.play.engine.actor.Entity
ch.epfl.cs107.play.areagame.actor.AreaEntity
ch.epfl.cs107.play.areagame.actor.CollectableAreaEntity
- All Implemented Interfaces:
Interactable,Acoustics,Actor,Graphics,Updatable,Positionable
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.epfl.cs107.play.areagame.actor.Interactable
Interactable.Listener -
Constructor Summary
ConstructorsConstructorDescriptionCollectableAreaEntity(Area area, Orientation orientation, DiscreteCoordinates position) Default CollectableAreaEntity constructorCollectableAreaEntity(Area area, Orientation orientation, DiscreteCoordinates position, boolean isCollected) Alternative CollectableAreaEntity constructor -
Method Summary
Methods inherited from class ch.epfl.cs107.play.areagame.actor.AreaEntity
getCurrentMainCellCoordinates, getOrientation, getOwnerArea, isMouseOver, onEntering, onLeaving, orientate, setCurrentPosition, setOwnerAreaMethods inherited from class ch.epfl.cs107.play.engine.actor.Entity
getPosition, getTransform, getVelocityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.epfl.cs107.play.areagame.actor.Interactable
acceptInteraction, getCurrentCells, isCellInteractable, isViewInteractable, takeCellSpace
-
Constructor Details
-
CollectableAreaEntity
Default CollectableAreaEntity constructor- Parameters:
area- (Area): Owner area. Not nullorientation- (Orientation): Initial orientation of the entity. Not nullposition- (Coordinate): Initial position of the entity. Not null
-
CollectableAreaEntity
public CollectableAreaEntity(Area area, Orientation orientation, DiscreteCoordinates position, boolean isCollected) Alternative CollectableAreaEntity constructor- Parameters:
area- (Area): Owner area. Not nullorientation- (Orientation): Initial orientation of the entity. Not nullposition- (Coordinate): Initial position of the entity. Not nullisCollected- (boolean): initial collected status of this
-
-
Method Details
-
collect
public void collect()Collect the object (set flag to true) -
isCollected
public boolean isCollected()
-