|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.adventure.conversation.Branch
public class Branch
A branch encapsulates the series of sentences that get spoken after the player chose a question from the conversation list menu.
Constructor Summary | |
---|---|
Branch(java.lang.String id,
java.lang.String title,
boolean available)
Creates a new conversation branch with the specified parameters. |
Method Summary | |
---|---|
void |
addSentence(Sentence sent)
Adds a Sentence object to the branch. |
java.lang.String |
getId()
Returns the id of the branch. |
java.util.List<Sentence> |
getSentences()
Returns the list of sentences of this branch. |
java.lang.String |
getTitle()
Returns the title of the branch which is the text that gets displayed in the conversation's dialog list menu for choosing the branch. |
boolean |
hasBeenSaid()
Determines whether or not this branch has been marked to have been said before. |
boolean |
isAvailable()
Determines whether or not this branch is (already) available for a conversation. |
void |
markAsSaid()
Marks this branch as been said. |
void |
setAvailable(boolean available)
Sets whethter or not this branch is available for a conversation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Branch(java.lang.String id, java.lang.String title, boolean available)
id
- internal id of the branchtitle
- tile of the branch (, will be display in the list menu)available
- is branch initially available? --> true=yes, false=noMethod Detail |
---|
public void addSentence(Sentence sent)
sent
- Sentence objectpublic java.util.List<Sentence> getSentences()
public java.lang.String getId()
public java.lang.String getTitle()
public boolean isAvailable()
public boolean hasBeenSaid()
public void markAsSaid()
public void setAvailable(boolean available)
available
- set available? --> true=yes, false=no
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |