Class CellMouseIndicator
java.lang.Object
ch.epfl.cs107.play.engine.actor.Entity
ch.epfl.cs107.play.areagame.actor.AreaEntity
ch.epfl.cs107.play.areagame.actor.CellMouseIndicator
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptInteraction(AreaInteractionVisitor v, boolean isCellInteraction) Call directly the interaction on this if acceptedvoidRenders itself on specified canvas.Get this Interactor's current occupying cells coordinatesbooleanbooleanbooleanIndicate if the current Interactable take the whole cell space or not i.e.voidupdate(float deltaTime) Simulates a single time step.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, getVelocity
-
Constructor Details
-
CellMouseIndicator
-
-
Method Details
-
getCurrentCells
Description copied from interface:InteractableGet this Interactor's current occupying cells coordinates- Returns:
- (List of DiscreteCoordinates). May be empty but not null
-
takeCellSpace
public boolean takeCellSpace()Description copied from interface:InteractableIndicate 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
public boolean isCellInteractable()- Returns:
- (boolean): true if this is able to have cell interactions
-
isViewInteractable
public boolean isViewInteractable()- Returns:
- (boolean): true if this is able to have view interactions
-
acceptInteraction
Description copied from interface:InteractableCall directly the interaction on this if accepted- Parameters:
v- (AreaInteractionVisitor) : the visitor
-
update
public void update(float deltaTime) Description copied from interface:UpdatableSimulates a single time step. Note: Need to be Override- Parameters:
deltaTime- elapsed time since last update, in seconds, non-negative
-
draw
Description copied from interface:GraphicsRenders itself on specified canvas.- Parameters:
canvas- target, not null
-