Interface Rotatable

All Known Subinterfaces:
Actor, NPC, Player, SceneObject

public interface Rotatable
An entity that is rotatable.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the current cardinal direction of this entity based on getRotation().
    int
    Gets the current rotation as an angle,
    boolean
    isFacing(Locatable locatable)
    Determines if the entity is facing the given locatable.
    boolean
    Determines 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 on getRotation().
      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
    • 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