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