Class CollectableAreaEntity

All Implemented Interfaces:
Interactable, Acoustics, Actor, Graphics, Updatable, Positionable

public abstract class CollectableAreaEntity extends AreaEntity
  • Constructor Details

    • CollectableAreaEntity

      public CollectableAreaEntity(Area area, Orientation orientation, DiscreteCoordinates position)
      Default CollectableAreaEntity constructor
      Parameters:
      area - (Area): Owner area. Not null
      orientation - (Orientation): Initial orientation of the entity. Not null
      position - (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 null
      orientation - (Orientation): Initial orientation of the entity. Not null
      position - (Coordinate): Initial position of the entity. Not null
      isCollected - (boolean): initial collected status of this
  • Method Details

    • collect

      public void collect()
      Collect the object (set flag to true)
    • isCollected

      public boolean isCollected()