|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectspeech.Dialog
public class Dialog
This class represents a dialog between the player and another character. It uses options for questions the player can ask
| Constructor Summary | |
|---|---|
Dialog(Player player,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
addDialogBranch(int id,
java.lang.String question,
Talk talkAction)
Adds a dialog branch to the dialog. |
DialogBranch |
getBranch(int id)
Returns the dialog branch with the specified id, if it exists, else this method returns null |
java.util.LinkedList<DialogBranch> |
getBranches()
Returns a list of dialog branches of this dialog |
java.lang.String |
getName()
Returns the name of the dialog. |
void |
runDialogBranch(int id)
Starts the dialog branch which is specified by the id |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dialog(Player player,
java.lang.String name)
| Method Detail |
|---|
public java.lang.String getName()
public void addDialogBranch(int id,
java.lang.String question,
Talk talkAction)
id - id for the dialog branchquestion - question that is associated to the dialog branchtalkAction - talk action to fire when choosing the dialog branchpublic void runDialogBranch(int id)
id - id of the dialog branch to be runpublic DialogBranch getBranch(int id)
id - id of the dialog branch to be found
public java.util.LinkedList<DialogBranch> getBranches()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||