|
Orxonox
0.0.5 Codename: Arcturus
|
this class is used for calling on a dialog form luascript More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/modules/dialog/DialogManager.h>
Public Member Functions | |
| DialogManager () | |
| bool | endtest (int index) |
| tests the dialog if there are any followup npc textoptions to the given answer or if there are no answers to the current question More... | |
| std::string | getAnswer (int index) |
| returns the answer to the id that is at index in the array of answers More... | |
| std::string | getPerson () |
| gives name of npc the player is currently talking to More... | |
| std::string | getQuestion () |
| gives the string of the momentary npc textoption More... | |
| int | getSize () |
| function that returns size of answerid array More... | |
| void | setDialog (Dialog *dialog) |
| allows to set the current dialog More... | |
| void | update (int index) |
| tells the dialog to update according to a given answer, if no answer is actively clicked the standard index is sett 0 in the lua when called the current question of the dialog is set to the new one and the answerId vector is set accordingly More... | |
Static Public Member Functions | |
| static DialogManager & | getInstance () |
| gives the pointer to the sigleton dialog manager to the lua script More... | |
Static Public Member Functions inherited from orxonox::Singleton< DialogManager > | |
| static bool | exists () |
| Tells whether the singleton has been created. More... | |
| static DialogManager & | getInstance () |
| Returns a reference to the singleton instance. More... | |
Private Attributes | |
| const std::vector< std::string > * | answerIds_ |
| pointer to the possible answerIds of the current question, for faster access More... | |
| Dialog * | currentTalk_ |
| pointer to the currently active dialog or last active if no one is currently active More... | |
Static Private Attributes | |
| static DialogManager * | singletonPtr_s |
| a pointer to the single class object More... | |
Friends | |
| class | Singleton< DialogManager > |
Additional Inherited Members | |
Protected Member Functions inherited from orxonox::Singleton< DialogManager > | |
| Singleton () | |
| Constructor sets the singleton instance pointer. More... | |
| virtual | ~Singleton () |
| Destructor resets the singleton instance pointer. More... | |
this class is used for calling on a dialog form luascript
the class is the interface of dialog to lua, all lua functionallity is given by this class, it can be found by lua due to singleton definition
| orxonox::DialogManager::DialogManager | ( | ) |
| bool orxonox::DialogManager::endtest | ( | int | index | ) |
tests the dialog if there are any followup npc textoptions to the given answer or if there are no answers to the current question
| std::string orxonox::DialogManager::getAnswer | ( | int | index | ) |
returns the answer to the id that is at index in the array of answers
| param1 | index of desired answer |
|
inlinestatic |
gives the pointer to the sigleton dialog manager to the lua script
| std::string orxonox::DialogManager::getPerson | ( | ) |
gives name of npc the player is currently talking to
| std::string orxonox::DialogManager::getQuestion | ( | ) |
gives the string of the momentary npc textoption
| int orxonox::DialogManager::getSize | ( | void | ) |
function that returns size of answerid array
allows to set the current dialog
this is used by a dialog when triggered to set its self to the current dialog
| dialog | pointer to the dialog that wants to be current one |
| void orxonox::DialogManager::update | ( | int | index | ) |
tells the dialog to update according to a given answer, if no answer is actively clicked the standard index is sett 0 in the lua when called the current question of the dialog is set to the new one and the answerId vector is set accordingly
| param1 | index of the answer given by the player |
|
friend |
|
private |
pointer to the possible answerIds of the current question, for faster access
|
private |
pointer to the currently active dialog or last active if no one is currently active
|
staticprivate |
a pointer to the single class object
1.8.11