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 "DialoguePrereqs.h" |
---|
10 | #include <vector> |
---|
11 | #include <string> |
---|
12 | #include "core/XMLPort.h" |
---|
13 | |
---|
14 | |
---|
15 | namespace orxonox { |
---|
16 | //ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false); |
---|
17 | RegisterAbstractClass(DialogueManager).inheritsFrom<Configurable>(); |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | DialogueManager* DialogueManager::singletonPtr_s =nullptr; |
---|
22 | |
---|
23 | DialogueManager::DialogueManager(Context* context): BaseObject(context){ |
---|
24 | RegisterObject(DialogueManager); |
---|
25 | this->setConfigValues(); |
---|
26 | |
---|
27 | |
---|
28 | } |
---|
29 | |
---|
30 | |
---|
31 | /** |
---|
32 | * @brief set the config values in the orxonox.ini file |
---|
33 | */ |
---|
34 | |
---|
35 | |
---|
36 | void DialogueManager::setquestion(std::string question){ |
---|
37 | question=question; |
---|
38 | } |
---|
39 | |
---|
40 | std::string DialogueManager::getquestion(void){ |
---|
41 | return question; |
---|
42 | } |
---|
43 | void DialogueManager::XMLPort(Element& xmlelement, XMLPort::Mode mode) |
---|
44 | { |
---|
45 | SUPER(DialogueManager, XMLPort, xmlelement, mode); |
---|
46 | |
---|
47 | XMLPortParam(DialogueManager, "question", setquestion, getquestion, xmlelement, mode); |
---|
48 | } |
---|
49 | |
---|
50 | bool DialogueManager::execute(bool bTriggered, BaseObject* trigger) |
---|
51 | { |
---|
52 | //if(!bTriggered) return false; |
---|
53 | |
---|
54 | |
---|
55 | |
---|
56 | orxout() << "bTriggered is " << bTriggered; |
---|
57 | //orxout() << " 1 " << mystring << endl; |
---|
58 | return false; |
---|
59 | } |
---|
60 | |
---|
61 | void DialogueManager::XMLEventPort(Element& xmlelement, XMLPort::Mode mode) |
---|
62 | { |
---|
63 | SUPER(DialogueManager, XMLEventPort, xmlelement, mode); |
---|
64 | |
---|
65 | XMLPortEventSink(DialogueManager, BaseObject, "execute", execute, xmlelement, mode); |
---|
66 | } |
---|
67 | |
---|
68 | /*std::string DialogueManager::setnpc(std::string npc){ |
---|
69 | return npc; |
---|
70 | } |
---|
71 | |
---|
72 | |
---|
73 | |
---|
74 | void DialogueManager::setanswers(std::string option1, std::string option2, std::string option3){ |
---|
75 | options.at(0)=option1; |
---|
76 | options.at(1)=option2; |
---|
77 | options.at(2)=option3; |
---|
78 | } |
---|
79 | |
---|
80 | vector<std::string> DialogueManager::getanswers(void){ |
---|
81 | return options; |
---|
82 | } |
---|
83 | |
---|
84 | int DialogueManager::getnumOptions(){ |
---|
85 | return options.size(); |
---|
86 | } |
---|
87 | |
---|
88 | */ |
---|
89 | } |
---|