de.rico.adventure.entity.character
Class AbstractCharacter

java.lang.Object
  extended by de.rico.adventure.entity.AbstractEntity
      extended by de.rico.adventure.entity.character.AbstractCharacter
Direct Known Subclasses:
NonPlayerCharacter, PlayableCharacter

public abstract class AbstractCharacter
extends AbstractEntity

This is the abstract base class for all the characters in the game.

Author:
Frank Bruns

Constructor Summary
AbstractCharacter(AbstractMesh mesh)
          Creates a new character with the specified mesh to use as a model.
 
Method Summary
 Room getRoom()
          Returns the characters current room or null, if none can be reference to the character.
 void say(java.lang.String text)
          Displays the specified text as a queued Say action.
 void say(java.lang.String text, java.lang.String pathSound)
          Displays the specified text as a queued Say action.
 void setRoom(Room room)
          Sets the characters current room.
 
Methods inherited from class de.rico.adventure.entity.AbstractEntity
destroy, drawScreenName, getMesh, getScreenName, getScriptId, isEnabled, setEnabled, setScreenName, setScriptId, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractCharacter

public AbstractCharacter(AbstractMesh mesh)
Creates a new character with the specified mesh to use as a model.

Parameters:
mesh - mesh to use as a model
Method Detail

setRoom

public void setRoom(Room room)
Sets the characters current room.

Parameters:
room - room the character is located in

getRoom

public Room getRoom()
Returns the characters current room or null, if none can be reference to the character.

Returns:
room the character is currently located in, or null

say

public void say(java.lang.String text)
Displays the specified text as a queued Say action.

Parameters:
text - text to say

say

public void say(java.lang.String text,
                java.lang.String pathSound)
Displays the specified text as a queued Say action.

Parameters:
text - text to say
pathSound - path to sound file for the sentence