- Timestamp:
- May 18, 2017, 5:05:53 PM (8 years ago)
- Location:
- code/branches/Dialogue_FS17
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Dialogue_FS17/data/gui/scripts/Dialogue.lua
r11428 r11432 128 128 129 129 function P.cleanup(destroyDetails) 130 130 131 if P.wrapper ~= nil then 131 132 winMgr:destroyWindow(P.wrapper) … … 141 142 end 142 143 end 144 orxonox.DialogueManager:getInstance():clean() 143 145 end 144 146 -
code/branches/Dialogue_FS17/data/levels/events.oxw
r11417 r11432 63 63 <possibleQuestions> 64 64 <NextQuestion question="Are you sure?" a1="yep let me continue" a2="no actually not" /> 65 <NextQuestion question="Why?" a1="Got a dentist's appointment" a2="this sucks" /> 65 <NextQuestion question="Why?" a1="Got a dentist's appointment" a2="this sucks" > 66 <possibleQuestions> 67 <NextQuestion question="Are your teeth that bad mate?" a1="yep" a2="leave me alone godammit" /> 68 <NextQuestion question="You suck" a1="..." a2="Im going now okay" /> 69 </possibleQuestions> 70 </NextQuestion> 66 71 </possibleQuestions> 67 72 <events> -
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc
r11428 r11432 47 47 48 48 } 49 void DialogueManager::setCurrentQuestion(NextQuestion* nq){ 50 currentQuestion=nq; 51 52 } 49 53 50 54 std::string DialogueManager::getquestion(void){ … … 92 96 this->setanswers1(nq->getanswers1()); 93 97 this->setanswers2(nq->getanswers2()); 98 depth=depth+1; 99 100 94 101 } 95 102 void DialogueManager::clean(){ 103 orxout() <<" depth " << depth << endl; 104 //allQuestions.at(2*depth+1); 105 } 96 106 bool DialogueManager::theEnd(){ 97 107 if((currentQuestion->possibleQuestions).empty()) { -
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h
r11428 r11432 50 50 bool theEnd(); //tolua_export 51 51 void update(NextQuestion* nq); 52 void clean(); //tolua_export 53 void setCurrentQuestion(NextQuestion* q); 52 54 53 55 private: … … 57 59 std::string a2; 58 60 std::string question; 61 int depth = 0; 59 62 static DialogueManager* singletonPtr_s; 60 63 -
code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.cc
r11428 r11432 77 77 78 78 m.setquestion(question); 79 m.setCurrentQuestion(this); 79 80 m.setanswers1(a1); 80 81 m.setanswers2(a2); -
code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.h
r11421 r11432 49 49 std::string a1; 50 50 std::string a2; 51 51 52 52 53 53
Note: See TracChangeset
for help on using the changeset viewer.