Package games.stendhal.client.entity
Class Gate
java.lang.Object
games.stendhal.client.entity.Gate
- All Implemented Interfaces:
IEntity
-
Field Summary
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener(EntityChangeListener<?> listener)
Add a change listener.void
addContentChangeListener(ContentChangeListener listener)
Add a listener for content changesgetArea()
Get the area the entity occupies.gets the cursor nameGet the entity class.Get the entity sub-class.double
Get the entity height.getID()
getName()
Get the name.getPath()
Get identifier path for the entity.int
Get the resistance this has on other entities (0-100).int
getResistance(IEntity entity)
Get the amount of resistance between this and another entity (0-100).Get the RPObject this represents.Gets the slot specified by name.getTitle()
Get the nicely formatted entity title.getType()
Get the entity type.int
Get the entity visibility.double
getWidth()
Get the entity width.double
getX()
Get the X coordinate.double
getY()
Get the Y coordinate.void
initialize(RPObject object)
Initialize this entity for an object.boolean
isObstacle(IEntity entity)
Determine if this is an obstacle for another entity.boolean
Determine if this entity is on the ground.boolean
isUser()
Check if the entity is the user.void
release()
Release this entity.void
removeChangeListener(EntityChangeListener<?> listener)
Remove a change listener.void
removeContentChangeListener(ContentChangeListener listener)
Remove a content change listener.void
setAudibleRange(double range)
void
update(int delta)
Update cycle.
-
Constructor Details
-
Gate
public Gate()
-
-
Method Details
-
addChangeListener
Description copied from interface:IEntity
Add a change listener.- Specified by:
addChangeListener
in interfaceIEntity
- Parameters:
listener
- The listener.
-
getArea
Description copied from interface:IEntity
Get the area the entity occupies. -
getAudibleArea
-
getEntityClass
Description copied from interface:IEntity
Get the entity class.- Specified by:
getEntityClass
in interfaceIEntity
- Returns:
- The entity class.
-
getEntitySubclass
Description copied from interface:IEntity
Get the entity sub-class.- Specified by:
getEntitySubclass
in interfaceIEntity
- Returns:
- The entity sub-class.
-
getHeight
public double getHeight()Description copied from interface:IEntity
Get the entity height. -
getID
-
getName
Description copied from interface:IEntity
Get the name. -
getRPObject
Description copied from interface:IEntity
Get the RPObject this represents.- Specified by:
getRPObject
in interfaceIEntity
- Returns:
- The RPObject.
-
getResistance
public int getResistance()Description copied from interface:IEntity
Get the resistance this has on other entities (0-100).- Specified by:
getResistance
in interfaceIEntity
- Returns:
- The resistance.
-
getResistance
Description copied from interface:IEntity
Get the amount of resistance between this and another entity (0-100).- Specified by:
getResistance
in interfaceIEntity
- Parameters:
entity
- The entity to check against.- Returns:
- The effective resistance.
-
getSlot
Description copied from interface:IEntity
Gets the slot specified by name. -
getTitle
Description copied from interface:IEntity
Get the nicely formatted entity title. This searches the follow attribute order: title, name (w/o underscore), type (w/o underscore). -
getType
Description copied from interface:IEntity
Get the entity type. -
getVisibility
public int getVisibility()Description copied from interface:IEntity
Get the entity visibility.- Specified by:
getVisibility
in interfaceIEntity
- Returns:
- The entity visibility (0 - 100).
-
getWidth
public double getWidth()Description copied from interface:IEntity
Get the entity width. -
getX
public double getX()Description copied from interface:IEntity
Get the X coordinate. -
getY
public double getY()Description copied from interface:IEntity
Get the Y coordinate. -
initialize
Description copied from interface:IEntity
Initialize this entity for an object.- Specified by:
initialize
in interfaceIEntity
- Parameters:
object
- The object.- See Also:
IEntity.release()
-
isObstacle
Description copied from interface:IEntity
Determine if this is an obstacle for another entity.- Specified by:
isObstacle
in interfaceIEntity
- Parameters:
entity
- The entity to check against.- Returns:
true
the entity can not enter this entity's area.
-
isOnGround
public boolean isOnGround()Description copied from interface:IEntity
Determine if this entity is on the ground.- Specified by:
isOnGround
in interfaceIEntity
- Returns:
true
if the entity is on the ground.
-
isUser
public boolean isUser()Description copied from interface:IEntity
Check if the entity is the user. -
release
public void release()Description copied from interface:IEntity
Release this entity. This should clean anything that isn't automatically released (such as unregister callbacks, cancel external operations, etc).- Specified by:
release
in interfaceIEntity
- See Also:
IEntity.initialize(RPObject)
-
removeChangeListener
Description copied from interface:IEntity
Remove a change listener.- Specified by:
removeChangeListener
in interfaceIEntity
- Parameters:
listener
- The listener.
-
setAudibleRange
public void setAudibleRange(double range) -
update
public void update(int delta)Description copied from interface:IEntity
Update cycle. -
getCursor
Description copied from interface:IEntity
gets the cursor name -
getPath
Get identifier path for the entity. -
addContentChangeListener
Description copied from interface:IEntity
Add a listener for content changes- Specified by:
addContentChangeListener
in interfaceIEntity
-
removeContentChangeListener
Description copied from interface:IEntity
Remove a content change listener.- Specified by:
removeContentChangeListener
in interfaceIEntity
-