Java Universal Role Playing Engine Version 0.3.9

jurpe.dialogs
Class Answer

java.lang.Object
  extended by jurpe.dialogs.Answer

public class Answer
extends java.lang.Object

An answer class. Any answer has an "answer" string, plus a key code (shortcut for the action to be taken if the answer is chosen) and a gotoCode, that is the ID of the next question.


Constructor Summary
Answer(java.lang.String answ, java.lang.String key, java.lang.String gtoCode)
          Answer object constructor
 
Method Summary
 java.lang.String getAnswer()
          The answer text
 java.lang.String getGotoCode()
          This is the code string representing the next unit to be shown if the answer is selected.
 java.lang.String getKey()
          This is a code to communicate something to the program, telling it that the answer has been chosen
 void setAnswer(java.lang.String answer)
          Set answer text
 void setGotoCode(java.lang.String gotoCode)
          Set the goto code, that is the next dialog unit called when this answer is chosen
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Answer

public Answer(java.lang.String answ,
              java.lang.String key,
              java.lang.String gtoCode)
Answer object constructor

Parameters:
answ - Answer text
key - Answer code (id)
gtoCode - Dialog unit goto code (the code to go to, when the answer is chosen)
See Also:
DialogUnit
Method Detail

getKey

public java.lang.String getKey()
This is a code to communicate something to the program, telling it that the answer has been chosen

Returns:
A unit code to be loaded

getAnswer

public java.lang.String getAnswer()
The answer text

Returns:
the answer text

setAnswer

public void setAnswer(java.lang.String answer)
Set answer text

Parameters:
answer - the answer text

getGotoCode

public java.lang.String getGotoCode()
This is the code string representing the next unit to be shown if the answer is selected.

Returns:
A unit code to be loaded

setGotoCode

public void setGotoCode(java.lang.String gotoCode)
Set the goto code, that is the next dialog unit called when this answer is chosen

Parameters:
gotoCode - The dialog unit goto code

Java Universal Role Playing Engine Version 0.3.9

Copyright ? 2010 http://jurpe.sourceforge.net/ All Rights Reserved.