|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.adventure.entity.AbstractEntity
public abstract class AbstractEntity
This is the abstract base class for all entities (game objects) in the game.
Constructor Summary | |
---|---|
AbstractEntity(AbstractMesh mesh)
Creates a new entity with the specified mesh as a model |
Method Summary | |
---|---|
void |
destroy()
Destroys the entity and releases its resources. |
void |
drawScreenName(int screenX,
int screenY)
Draws the description of the character at the specified screen position. |
AbstractMesh |
getMesh()
Returns the mesh that is used for this entity. |
java.lang.String |
getScreenName()
Returns the entity's screen name. |
java.lang.String |
getScriptId()
Returns the reference id for this entity which is used in a script file. |
boolean |
isEnabled()
Determines whether or not the entity is enabled. |
void |
setEnabled(boolean enable)
Sets whether or not this entity is enabled. |
void |
setScreenName(java.lang.String name)
Sets the screen name of the entity. |
void |
setScriptId(java.lang.String id)
Sets the identifier that can be used to refer to this entity in a script file. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractEntity(AbstractMesh mesh)
mesh
- mesh to use as a model for the entityMethod Detail |
---|
public void setScreenName(java.lang.String name)
name
- screen name of the entitypublic java.lang.String getScreenName()
public AbstractMesh getMesh()
public java.lang.String getScriptId()
java.lang.NullPointerException
- Occurs when no id has been specified for the
entity.public void setScriptId(java.lang.String id)
id
- reference id in a script filepublic boolean isEnabled()
public void setEnabled(boolean enable)
enable
- set enabled? --> true=yes, false=nopublic void drawScreenName(int screenX, int screenY)
screenX
- x-coordinate on the screenscreenY
- y-coordinate on the screenpublic java.lang.String toString()
toString
in class java.lang.Object
public void destroy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |