Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Dialog_HS17/src/modules/dialogue/DialogueManager.h @ 11611

Last change on this file since 11611 was 11435, checked in by rrogge, 7 years ago

Code aufgeraeumt

File size: 2.0 KB
Line 
1#ifndef _DialogueManager_H__
2#define _DialogueManager_H__
3
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"
11#include "util/Singleton.h"
12#include <string>
13#include <vector>
14#include "core/config/Configurable.h"
15#include "core/XMLPort.h"
16#include "core/EventIncludes.h"
17#include "DialoguePrereqs.h"
18#include "NextQuestion.h"
19
20
21
22
23namespace orxonox //tolua_export
24
25{//tolua_export
26        class _OrxonoxExport DialogueManager //tolua_export
27        : public Singleton<DialogueManager>
28        {//tolua_export
29                friend class Singleton<DialogueManager>;
30       
31                public:
32               
33                DialogueManager(); 
34               
35
36                static DialogueManager& getInstance() { return Singleton<DialogueManager>::getInstance(); } //tolua_export
37               
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
64private:
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
72        };//tolua_export
73}//tolua_export
74#endif
Note: See TracBrowser for help on using the repository browser.