- Timestamp:
- Apr 13, 2017, 3:47:48 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.cc
r11393 r11401 1 1 #include <vector> 2 2 #include <string> 3 #include "core/CoreIncludes.h" 4 #include "core/GUIManager.h" 5 3 6 4 7 #include "NextQuestion.h" … … 9 12 RegisterClass(NextQuestion); 10 13 11 vector<NextQuestion> nextquestion; 14 NextQuestion::NextQuestion(Context* context) : BaseObject(context) 15 { 16 RegisterObject(NextQuestion); 17 orxout() << "Klasse aufgerufen" << endl; 12 18 13 void NextQuestion::setanswers(std::string option1, std::string option2, std::string option3){ 19 } 20 21 void NextQuestion::setquestion(std::string question){ 22 question=question; 23 } 24 25 std::string NextQuestion::getquestion(void){ 26 return question; 27 } 28 29 30 // 31 32 33 //XML and Event shit 34 void NextQuestion::XMLPort(Element& xmlelement, XMLPort::Mode mode) 35 { 36 SUPER(NextQuestion, XMLPort, xmlelement, mode); 37 38 XMLPortParam(NextQuestion, "question", setquestion, getquestion, xmlelement, mode); 39 } 40 bool NextQuestion::execute(bool bTriggered, BaseObject* trigger) 41 { 42 //if(!bTriggered) return false; 43 44 45 46 47 orxout() << "bTriggered is " << bTriggered << endl; 48 49 for (DialogueManager* hud : ObjectList<DialogueManager>()) 50 m = hud; 51 m->setquestion(question); 52 //orxout() << " 1 " << mystring << endl; 53 return false; 54 } 55 56 void NextQuestion::XMLEventPort(Element& xmlelement, XMLPort::Mode mode) 57 { 58 SUPER(NextQuestion, XMLEventPort, xmlelement, mode); 59 60 XMLPortEventSink(NextQuestion, BaseObject, "execute", execute, xmlelement, mode); 61 } 62 /*void NextQuestion::setanswers(std::string option1, std::string option2, std::string option3){ 14 63 options.at(0)=option1; 15 64 options.at(1)=option2; … … 23 72 int NextQuestion::getnumOptions(){ 24 73 return options.size(); 25 } 74 }*/ 26 75 27 76 }
Note: See TracChangeset
for help on using the changeset viewer.