Changeset 11718 for code/trunk/src/modules/dialogue/DialogueManager.h
- Timestamp:
- Jan 7, 2018, 10:34:30 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/dialogue/DialogueManager.h
r11699 r11718 24 24 25 25 {//tolua_export 26 class _DialogueExport DialogueManager //tolua_export 27 : public Singleton<DialogueManager> 28 {//tolua_export 29 friend class Singleton<DialogueManager>; 30 31 public: 32 33 DialogueManager(); 34 26 class _DialogueExport DialogueManager //tolua_export 27 : public Singleton<DialogueManager> 28 {//tolua_export 29 friend class Singleton<DialogueManager>; 35 30 36 static DialogueManager& getInstance() { return Singleton<DialogueManager>::getInstance(); } //tolua_export 37 31 public: 38 32 39 void setquestion(std::string question); //tolua_export 40 std::string getquestion(void); //tolua_export 41 42 43 void setanswers1(std::string a1); //tolua_export 44 std::string getanswers1(void); //tolua_export 45 46 void setanswers2(std::string a2); //tolua_export 47 std::string getanswers2(void); //tolua_export 48 49 void setCurrentQuestion(NextQuestion* q); 33 DialogueManager(); 50 34 51 //Sets the current Question to the question corresponding to the first/second answer52 void a1clicked(void); //tolua_export53 void a2clicked(void); //tolua_export54 55 //Checks whether there are any more Questions to come56 bool theEnd(); //tolua_export57 35 58 //Sets question and a1, a2 for new currentQuestion 59 void update(NextQuestion* nq); 36 static DialogueManager& getInstance() { return Singleton<DialogueManager>::getInstance(); } //tolua_export 60 37 61 //Is executed whenever a NextQuestion is created and pushes all NextQuestion into the allQuestion vector. 62 void registerquestion(NextQuestion* nq); 38 39 void setquestion(std::string question); //tolua_export 40 std::string getquestion(void); //tolua_export 41 42 43 void setanswers1(std::string a1); //tolua_export 44 std::string getanswers1(void); //tolua_export 45 46 void setanswers2(std::string a2); //tolua_export 47 std::string getanswers2(void); //tolua_export 48 49 void setCurrentQuestion(NextQuestion* q); 50 51 //Sets the current Question to the question corresponding to the first/second answer 52 void a1clicked(void); //tolua_export 53 void a2clicked(void); //tolua_export 54 55 //Checks whether there are any more Questions to come 56 bool theEnd(); //tolua_export 57 58 //Sets question and a1, a2 for new currentQuestion 59 void update(NextQuestion* nq); 60 61 //Is executed whenever a NextQuestion is created and pushes all NextQuestion into the allQuestion vector. 62 void registerquestion(NextQuestion* nq); 63 63 64 64 private: 65 66 67 68 69 70 65 NextQuestion* currentQuestion; //The Question which is currently displayed 66 std::vector<NextQuestion*> allQuestions; 67 std::string a1; //answer on first button 68 std::string a2; //answer on second button 69 std::string question; 70 static DialogueManager* singletonPtr_s; 71 71 72 72 };//tolua_export 73 73 }//tolua_export 74 74 #endif
Note: See TracChangeset
for help on using the changeset viewer.