Interface Interactable

All Known Implementing Classes:
AreaBehavior.Cell, AreaEntity, CellMouseIndicator, CollectableAreaEntity, DraggableAreaEntity, MovableAreaEntity

public interface Interactable
Represent Interactable object (i.e. Interactor can interact with it)
See Also:
  • Method Details

    • getCurrentCells

      List<DiscreteCoordinates> getCurrentCells()
      Get this Interactor's current occupying cells coordinates
      Returns:
      (List of DiscreteCoordinates). May be empty but not null
    • takeCellSpace

      boolean takeCellSpace()
      Indicate if the current Interactable take the whole cell space or not i.e. only one Interactable which takeCellSpace can be in a cell (how many Interactable which don't takeCellSpace can also be in the same cell)
      Returns:
      (boolean)
    • isCellInteractable

      boolean isCellInteractable()
      Returns:
      (boolean): true if this is able to have cell interactions
    • isViewInteractable

      boolean isViewInteractable()
      Returns:
      (boolean): true if this is able to have view interactions
    • acceptInteraction

      void acceptInteraction(AreaInteractionVisitor v, boolean isCellInteraction)
      Call directly the interaction on this if accepted
      Parameters:
      v - (AreaInteractionVisitor) : the visitor
    • onLeaving

      void onLeaving(List<DiscreteCoordinates> coordinates)
      Called when this Interactable leaves a cell
      Parameters:
      coordinates - left cell coordinates
    • onEntering

      void onEntering(List<DiscreteCoordinates> coordinates)
      Called when this Interactable enters a cell
      Parameters:
      coordinates - entered cell coordinates