|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.rico.adventure.entity.AbstractEntity
de.rico.adventure.entity.character.AbstractCharacter
de.rico.adventure.entity.character.PlayableCharacter
public class PlayableCharacter
Class for playable characters.
| Constructor Summary | |
|---|---|
PlayableCharacter(AbstractMesh mesh,
AbstractInventory inventory)
Creates a new playable character that uses the specified mesh as a model and the specified inventory system for its items. |
|
| Method Summary | |
|---|---|
AbstractInventory |
getInventory()
Returns the inventory of the character. |
Room |
getPreviousRoom()
Returns the room the player previously visited. |
void |
pickUp(Item item)
This method picks up an item and adds it to the playable character's inventory. |
void |
setInventory(AbstractInventory inventory)
Sets the inventory system of the character. |
void |
setPreviousRoom(Room room)
Sets the room that was previously visited by the player. |
boolean |
uses(Item item)
Determines whether or not the specified item is equal to the one that is currently selected from the inventory. |
| Methods inherited from class de.rico.adventure.entity.character.AbstractCharacter |
|---|
getRoom, say, say, setRoom |
| 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 |
|---|
public PlayableCharacter(AbstractMesh mesh,
AbstractInventory inventory)
mesh - mesh to use as a modelinventory - inventory system for the character| Method Detail |
|---|
public Room getPreviousRoom()
public void setPreviousRoom(Room room)
room - room that was previously visited by the playerpublic void setInventory(AbstractInventory inventory)
inventory - inventory system for the characterpublic AbstractInventory getInventory()
public void pickUp(Item item)
item - item to pick up and add to the inventorypublic boolean uses(Item item)
item - item to checked for being currently used.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||