Interface Rotatable
-
- All Known Subinterfaces:
Actor
,NPC
,Player
,SceneObject
public interface Rotatable
An entity that is rotatable.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Direction
getDirection()
Gets the current cardinal direction of this entity based ongetRotation()
.int
getRotation()
Gets the current rotation as an angle,boolean
isFacing(Locatable locatable)
Determines if the entity is facing the given locatable.boolean
isFacingMe()
Determines if the entity is facing the player.
-
-
-
Method Detail
-
getRotation
int getRotation()
Gets the current rotation as an angle,- Returns:
- the rotation
- See Also:
Direction
-
getDirection
Direction getDirection()
Gets the current cardinal direction of this entity based ongetRotation()
.
-
isFacingMe
boolean isFacingMe()
Determines if the entity is facing the player.- Returns:
- true if the entity is facing towards the player, false otherwise
-
isFacing
boolean isFacing(Locatable locatable)
Determines if the entity is facing the given locatable.- Parameters:
locatable
- the locatable- Returns:
- true if the entity is facing towards the locatable, false otherwise
-
-