Package games.stendhal.client.entity
Class ActiveEntity
java.lang.Object
games.stendhal.client.entity.Entity
games.stendhal.client.entity.ActiveEntity
- All Implemented Interfaces:
IEntity
,RPObjectChangeListener
An entity that has movement and direction.
-
Field Summary
Modifier and TypeFieldDescriptionstatic games.stendhal.client.entity.Property
Direction property.static games.stendhal.client.entity.Property
Speed property.Fields inherited from class games.stendhal.client.entity.Entity
clazz, inAdd, name, rpObject, title, type, x, y
Fields inherited from interface games.stendhal.client.entity.IEntity
PROP_ANIMATED, PROP_CLASS, PROP_NAME, PROP_POSITION, PROP_SIZE, PROP_STATE, PROP_TITLE, PROP_VISIBILITY
-
Method Summary
Modifier and TypeMethodDescriptionGet the direction.void
initialize(RPObject base)
Initialize this entity for an object.boolean
isFlying()
Checks if the entity is a flying entity.protected void
processPositioning(RPObject base, RPObject diff)
Process attribute changes that may affect positioning.boolean
stopped()
Determine if this entity is not moving.void
update(int delta)
Update cycle.Methods inherited from class games.stendhal.client.entity.Entity
addChangeListener, addContentChangeListener, fireChange, getArea, getCursor, getEntityClass, getEntitySubclass, getHeight, getID, getName, getObjectID, getPath, getResistance, getResistance, getRPObject, getSlot, getTitle, getType, getVisibility, getWidth, getX, getY, isObstacle, isOnGround, isUser, onAdded, onChangedAdded, onChangedRemoved, onPosition, onRemoved, onSlotAdded, onSlotChangedAdded, onSlotChangedRemoved, onSlotRemoved, release, removeChangeListener, removeContentChangeListener, toString
-
Field Details
-
PROP_DIRECTION
public static final games.stendhal.client.entity.Property PROP_DIRECTIONDirection property. -
PROP_SPEED
public static final games.stendhal.client.entity.Property PROP_SPEEDSpeed property.
-
-
Method Details
-
getDirection
Get the direction.- Returns:
- The direction.
-
stopped
public boolean stopped()Determine if this entity is not moving.- Returns:
true
if not moving.
-
initialize
Initialize this entity for an object.- Specified by:
initialize
in interfaceIEntity
- Overrides:
initialize
in classEntity
- Parameters:
base
- The object.- See Also:
Entity.release()
-
update
public void update(int delta)Update cycle. -
processPositioning
Process attribute changes that may affect positioning. This is needed because different entities may want to process coordinate changes more gracefully.- Overrides:
processPositioning
in classEntity
- Parameters:
base
- The previous values.diff
- The changes.
-
isFlying
public boolean isFlying()Checks if the entity is a flying entity.- Returns:
-