|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.adventure.structure.Chapter
public class Chapter
This class is used for structuring different rooms into a chaper.
Constructor Summary | |
---|---|
Chapter()
Creates a new chapter. |
Method Summary | |
---|---|
void |
addConversation(Conversation con)
Adds the specified conversation object to the chapter. |
void |
addConversations(java.util.List<Conversation> cons)
Adds the conversations of the specified list to the chapter. |
void |
addRoom(Room room)
Adds a room to the chapter. |
void |
draw(javax.media.opengl.GL gl)
Draws the currently active room. |
Room |
getActiveRoom()
Returns the currently active room of the chapter. |
Conversation |
getConversation(java.lang.String id)
Returns the conversation that corresponds to the specified id. |
java.util.List<Room> |
getRooms()
Returns a list of all the rooms of the chapter. |
ScriptInterpreter |
getScriptInterpreter()
Returns the script interpreter of this room, if it has been initialized with a script file before. |
void |
initScripting()
Initializes scripting for the rooms of this chapter. |
void |
setActiveRoom(java.lang.String roomId)
Sets the new active room of the chapter. |
void |
update(long elapsedTime)
Updates the currently active room. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Chapter()
Method Detail |
---|
public void addRoom(Room room)
room
- room to add to the chapterpublic Room getActiveRoom()
public void setActiveRoom(java.lang.String roomId)
roomId
- script id of the room to set activepublic java.util.List<Room> getRooms()
public void addConversation(Conversation con)
con
- conversation objectpublic void addConversations(java.util.List<Conversation> cons)
cons
- list of conversationspublic Conversation getConversation(java.lang.String id)
id
- id of the conversation to retrieve
public void initScripting()
public ScriptInterpreter getScriptInterpreter()
null
.
public void update(long elapsedTime)
elapsedTime
- time between two frames.public void draw(javax.media.opengl.GL gl)
gl
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |