Class Creature

All Implemented Interfaces:
IEntity, RPObjectChangeListener
Direct Known Subclasses:
BossCreature

public class Creature extends RPEntity
  • Field Details

    • PROP_DEBUG

      public static final games.stendhal.client.entity.Property PROP_DEBUG
      Debug property.
    • PROP_METAMORPHOSIS

      public static final games.stendhal.client.entity.Property PROP_METAMORPHOSIS
      Metamorphosis property.
  • Constructor Details

    • Creature

      public Creature()
  • Method Details

    • nonCreatureClientAddEventLine

      protected void nonCreatureClientAddEventLine(String text)
    • getDebug

      public String getDebug()
    • getMetamorphosis

      public String getMetamorphosis()
      Get the metamorphosis in effect.
      Returns:
      The metamorphosis, or null.
    • getArea

      public Rectangle2D getArea()
      Get the area the entity occupies.
      Specified by:
      getArea in interface IEntity
      Overrides:
      getArea in class Entity
      Returns:
      A rectange (in world coordinate units).
    • initialize

      public void initialize(RPObject object)
      Initialize this entity for an object.
      Specified by:
      initialize in interface IEntity
      Overrides:
      initialize in class RPEntity
      Parameters:
      object - The object.
      See Also:
      RPEntity.release()
    • onChangedAdded

      public void onChangedAdded(RPObject object, RPObject changes)
      The object added/changed attribute(s).
      Specified by:
      onChangedAdded in interface RPObjectChangeListener
      Overrides:
      onChangedAdded in class RPEntity
      Parameters:
      object - The base object.
      changes - The changes.
    • onChangedRemoved

      public void onChangedRemoved(RPObject object, RPObject changes)
      The object removed attribute(s).
      Specified by:
      onChangedRemoved in interface RPObjectChangeListener
      Overrides:
      onChangedRemoved in class RPEntity
      Parameters:
      object - The base object.
      changes - The changes.
    • onTalk

      public void onTalk(String text)
      Description copied from class: RPEntity
      Called when entity says something.
      Overrides:
      onTalk in class RPEntity
      Parameters:
      text - message contents
    • addSounds

      protected void addSounds(String groupName, String categoryName, String... soundNames)
    • onPosition

      protected void onPosition(double x, double y)
      Description copied from class: Entity
      When the entity's position changed.
      Overrides:
      onPosition in class Entity
      Parameters:
      x - The new X coordinate.
      y - The new Y coordinate.
    • playRandomSoundFromCategory

      protected void playRandomSoundFromCategory(String groupName, String categoryName)
    • playRandomSoundFromGroup

      protected void playRandomSoundFromGroup(String groupName, String categoryName, long waitTimeInMilliSec)
    • playSoundFromCategory

      protected void playSoundFromCategory(String groupName, String categoryName)
    • playSoundFromCategory

      protected void playSoundFromCategory(String groupName, String categoryName, int index)