Interface Actor

All Superinterfaces:
Actionable, Animable, Clickable, GameEntity, Identifiable, Interactable, Locatable, LocatableEntity, Modeled, Nameable, Renderable, Rotatable, Validatable
All Known Subinterfaces:
NPC, Player

public interface Actor extends GameEntity, Rotatable, Animable, Identifiable, Nameable
An in-game character aka a NPC or Player.
  • Method Details

    • getMessage

      String getMessage()
      Gets the dialogue/message above this actors head.
      Returns:
      String or null if no message
    • getHealthPercent

      int getHealthPercent()
      Gets the health of this actor.
      Returns:
      the health percentage. If the health cannot be determined (e.g. not in combat), then 100 is returned.
    • getHealthPercent

      int getHealthPercent(int id)
      Get the health of a healthbar with specified id.
      Parameters:
      id -
      Returns:
      the health percentage or -1
    • isDead

      default boolean isDead()
      Gets whether or not this actor is dead. If the health could not be determined (no visible healthbar), then this will return false.
      Returns:
      true if dead, false otherwise
    • isMoving

      boolean isMoving()
      Gets whether or not this actor is moving.
      Returns:
      true if moving, false otherwise
    • isInCombat

      boolean isInCombat()
      Gets whether or not this actor is in combat.
      Returns:
      true if in combat, false otherwise
    • isAttacking

      default boolean isAttacking()
      Gets whether or not this actor is attacking. This is basically a convenience method for the conditions isInCombat() and getInteracting() not being null.
      Returns:
      true if we are attacking, false otherwise
    • getHitsplatCycles

      int[] getHitsplatCycles()
    • getHitsplatTypes

      int[] getHitsplatTypes()
    • getHitsplatValues

      int[] getHitsplatValues()
    • getInteracting

      Actor getInteracting()
      Gets the actor that this actor is interacting with (e.g. talking or attacking)
      Returns:
      the actor or null if this actor is not interacting
    • isInteractingWithMe

      boolean isInteractingWithMe()
      Gets whether or not this actor is interacting with the local player.
      Returns:
      true if interacting with local player, false otherwise
    • getServerLocation

      Tile getServerLocation()
    • getDestination

      Tile getDestination()
      Gets the walking destination of this actor.
      Returns:
      the destination tile or null
    • getPathSize

      int getPathSize()
    • getPathX

      int[] getPathX()
    • getPathY

      int[] getPathY()
    • getSpotAnimationIds

      int[] getSpotAnimationIds()
    • getWalkingDirection

      Direction getWalkingDirection()
      Gets the direction we are walking towards.
      Returns:
      the direction or null if we are not walking