1 | #include "core/CoreIncludes.h" |
---|
2 | #include "core/LuaState.h" |
---|
3 | #include "core/GUIManager.h" |
---|
4 | #include "core/class/Identifier.h" |
---|
5 | #include "core/singleton/ScopedSingletonIncludes.h" |
---|
6 | #include "network/Host.h" |
---|
7 | #include "network/NetworkFunctionIncludes.h" |
---|
8 | #include "DialogueManager.h" |
---|
9 | #include <vector> |
---|
10 | #include <string> |
---|
11 | #include "core/XMLPort.h" |
---|
12 | #include "NextQuestion.h" |
---|
13 | |
---|
14 | |
---|
15 | |
---|
16 | namespace orxonox { |
---|
17 | ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false); |
---|
18 | |
---|
19 | |
---|
20 | //DialogueManager* DialogueManager::singletonPtr_s =nullptr; |
---|
21 | |
---|
22 | DialogueManager::DialogueManager(){ |
---|
23 | orxout() << "Dialog Konstruktor" << endl; |
---|
24 | //RegisterObject(DialogueManager); |
---|
25 | |
---|
26 | |
---|
27 | |
---|
28 | } |
---|
29 | |
---|
30 | |
---|
31 | /** |
---|
32 | * @brief set the config values in the orxonox.ini file |
---|
33 | */ |
---|
34 | |
---|
35 | |
---|
36 | void DialogueManager::registerquestion(NextQuestion* nq){ |
---|
37 | allQuestions.push_back(nq); |
---|
38 | |
---|
39 | } |
---|
40 | |
---|
41 | void DialogueManager::setquestion(std::string q){ |
---|
42 | question=q; |
---|
43 | |
---|
44 | } |
---|
45 | |
---|
46 | std::string DialogueManager::getquestion(void){ |
---|
47 | orxout() << question << endl; |
---|
48 | return question; |
---|
49 | } |
---|
50 | void DialogueManager::setanswers1(std::string a1){ |
---|
51 | orxout() << "setanswers1" << endl; |
---|
52 | this->a1=a1; |
---|
53 | orxout() << "A1 is " << a1; |
---|
54 | } |
---|
55 | |
---|
56 | void DialogueManager::setanswers2(std::string a2){ |
---|
57 | this->a2=a2; |
---|
58 | } |
---|
59 | |
---|
60 | |
---|
61 | |
---|
62 | std::string DialogueManager::getanswers1(void){ |
---|
63 | orxout() << "getanswers1" << endl; |
---|
64 | return a1; |
---|
65 | } |
---|
66 | |
---|
67 | std::string DialogueManager::getanswers2(void){ |
---|
68 | return a2; |
---|
69 | } |
---|
70 | bool DialogueManager::a1clicked(void){ |
---|
71 | orxout() << "a1 clicked" << endl; |
---|
72 | currentQuestion = currentQuestion->possibleQuestions[0]; |
---|
73 | return true; |
---|
74 | } |
---|
75 | bool DialogueManager::a2clicked(void){ |
---|
76 | orxout() << "a2 clicked" << endl; |
---|
77 | return true; |
---|
78 | } |
---|
79 | /*void DialogueManager::XMLPort(Element& xmlelement, XMLPort::Mode mode) |
---|
80 | { |
---|
81 | SUPER(DialogueManager, XMLPort, xmlelement, mode); |
---|
82 | |
---|
83 | XMLPortParam(DialogueManager, "question", setquestion, getquestion, xmlelement, mode); |
---|
84 | }*/ |
---|
85 | |
---|
86 | |
---|
87 | |
---|
88 | /*std::string DialogueManager::setnpc(std::string npc){ |
---|
89 | return npc; |
---|
90 | } |
---|
91 | |
---|
92 | |
---|
93 | |
---|
94 | |
---|
95 | vector<std::string> DialogueManager::getanswers(void){ |
---|
96 | return options; |
---|
97 | } |
---|
98 | |
---|
99 | int DialogueManager::getnumOptions(){ |
---|
100 | return options.size(); |
---|
101 | } |
---|
102 | |
---|
103 | */ |
---|
104 | } |
---|