- Timestamp:
- May 18, 2017, 2:49:13 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc
r11417 r11421 24 24 //RegisterObject(DialogueManager); 25 25 26 27 28 26 } 29 27 … … 35 33 36 34 void DialogueManager::registerquestion(NextQuestion* nq){ 35 if(allQuestions.size()==0) { 36 orxout(internal_info) << "At least one NextQuestion has to be set." << endl; 37 } else { 38 currentQuestion = allQuestions[0]; 39 } 37 40 allQuestions.push_back(nq); 41 orxout(internal_info) << "qsize " << allQuestions.size(); 38 42 39 43 } … … 68 72 return a2; 69 73 } 70 bool DialogueManager::a1clicked(void){ 71 orxout() << "a1 clicked" << endl; 74 void DialogueManager::a1clicked(void){ 75 76 assert((currentQuestion->retposQues())[0]); 77 orxout() << "a14 clicked" << endl; 78 orxout() << currentQuestion->possibleQuestions[0] << endl; 72 79 currentQuestion = currentQuestion->possibleQuestions[0]; 73 return true; 80 update(currentQuestion); 81 82 74 83 } 75 boolDialogueManager::a2clicked(void){84 void DialogueManager::a2clicked(void){ 76 85 orxout() << "a2 clicked" << endl; 77 return true;86 78 87 } 79 /*void DialogueManager::XMLPort(Element& xmlelement, XMLPort::Mode mode) 80 { 81 SUPER(DialogueManager, XMLPort, xmlelement, mode); 82 83 XMLPortParam(DialogueManager, "question", setquestion, getquestion, xmlelement, mode); 84 }*/ 88 void DialogueManager::update(NextQuestion* nq){ 89 this->setquestion(nq->getquestion()); 90 this->setanswers1(nq->getanswers1()); 91 this->setanswers2(nq->getanswers2()); 92 } 85 93 86 94 87 95 88 /*std::string DialogueManager::setnpc(std::string npc){ 89 return npc; 96 97 98 /* 99 100 bool DialogueManager::theEnd(){ 101 if(currentQuestion->retposQues()) return true; 102 else return false; 90 103 } 91 92 104 93 105
Note: See TracChangeset
for help on using the changeset viewer.