[11417] | 1 | #ifndef _DialogueManager_H__ |
---|
| 2 | #define _DialogueManager_H__ |
---|
| 3 | |
---|
[11371] | 4 | #include "core/CoreIncludes.h" |
---|
| 5 | #include "core/LuaState.h" |
---|
| 6 | #include "core/GUIManager.h" |
---|
| 7 | #include "core/class/Identifier.h" |
---|
| 8 | #include "core/singleton/ScopedSingletonIncludes.h" |
---|
| 9 | #include "network/Host.h" |
---|
| 10 | #include "network/NetworkFunctionIncludes.h" |
---|
[11382] | 11 | #include "util/Singleton.h" |
---|
| 12 | #include <string> |
---|
| 13 | #include <vector> |
---|
[11384] | 14 | #include "core/config/Configurable.h" |
---|
[11390] | 15 | #include "core/XMLPort.h" |
---|
[11393] | 16 | #include "core/EventIncludes.h" |
---|
[11417] | 17 | #include "DialoguePrereqs.h" |
---|
| 18 | #include "NextQuestion.h" |
---|
[11371] | 19 | |
---|
[11406] | 20 | |
---|
[11413] | 21 | |
---|
[11415] | 22 | |
---|
[11406] | 23 | namespace orxonox //tolua_export |
---|
| 24 | |
---|
| 25 | {//tolua_export |
---|
[11718] | 26 | class _DialogueExport DialogueManager //tolua_export |
---|
| 27 | : public Singleton<DialogueManager> |
---|
| 28 | {//tolua_export |
---|
| 29 | friend class Singleton<DialogueManager>; |
---|
[11393] | 30 | |
---|
[11718] | 31 | public: |
---|
[11435] | 32 | |
---|
[11718] | 33 | DialogueManager(); |
---|
[11435] | 34 | |
---|
| 35 | |
---|
[11718] | 36 | static DialogueManager& getInstance() { return Singleton<DialogueManager>::getInstance(); } //tolua_export |
---|
[11382] | 37 | |
---|
[11435] | 38 | |
---|
[11718] | 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 | |
---|
[11382] | 64 | private: |
---|
[11718] | 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; |
---|
[11371] | 71 | |
---|
[11718] | 72 | };//tolua_export |
---|
[11406] | 73 | }//tolua_export |
---|
[11699] | 74 | #endif |
---|