[11371] | 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" |
---|
[11382] | 9 | #include "DialoguePrereqs.h" |
---|
| 10 | #include <vector> |
---|
| 11 | #include <string> |
---|
[11393] | 12 | #include "core/XMLPort.h" |
---|
[11371] | 13 | |
---|
[11393] | 14 | |
---|
[11371] | 15 | namespace orxonox { |
---|
[11393] | 16 | //ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false); |
---|
[11394] | 17 | RegisterAbstractClass(DialogueManager).inheritsFrom<BaseObject>(); |
---|
[11371] | 18 | |
---|
[11393] | 19 | |
---|
| 20 | |
---|
| 21 | DialogueManager* DialogueManager::singletonPtr_s =nullptr; |
---|
| 22 | |
---|
| 23 | DialogueManager::DialogueManager(Context* context): BaseObject(context){ |
---|
[11406] | 24 | orxout() << "Dialog Konstruktor" << endl; |
---|
[11371] | 25 | RegisterObject(DialogueManager); |
---|
[11393] | 26 | |
---|
[11394] | 27 | |
---|
[11377] | 28 | |
---|
[11371] | 29 | } |
---|
[11382] | 30 | |
---|
[11393] | 31 | |
---|
[11384] | 32 | /** |
---|
| 33 | * @brief set the config values in the orxonox.ini file |
---|
| 34 | */ |
---|
[11393] | 35 | |
---|
[11371] | 36 | |
---|
[11406] | 37 | void DialogueManager::setquestion(std::string q){ |
---|
| 38 | question=q; |
---|
[11413] | 39 | |
---|
[11377] | 40 | } |
---|
| 41 | |
---|
[11384] | 42 | std::string DialogueManager::getquestion(void){ |
---|
[11406] | 43 | orxout() << question << endl; |
---|
[11382] | 44 | return question; |
---|
[11377] | 45 | } |
---|
[11413] | 46 | void DialogueManager::setanswers1(std::string a1){ |
---|
| 47 | orxout() << "setanswers1" << endl; |
---|
| 48 | this->a1=a1; |
---|
| 49 | orxout() << "A1 is " << a1; |
---|
| 50 | } |
---|
| 51 | |
---|
| 52 | void DialogueManager::setanswers2(std::string a2){ |
---|
| 53 | this->a2=a2; |
---|
| 54 | } |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | std::string DialogueManager::getanswers1(void){ |
---|
| 59 | orxout() << "getanswers1" << endl; |
---|
| 60 | return a1; |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | std::string DialogueManager::getanswers2(void){ |
---|
| 64 | return a2; |
---|
| 65 | } |
---|
| 66 | bool DialogueManager::a1clicked(void){ |
---|
| 67 | orxout() << "a1 clicked" << endl; |
---|
| 68 | return true; |
---|
| 69 | } |
---|
| 70 | bool DialogueManager::a2clicked(void){ |
---|
| 71 | orxout() << "a2 clicked" << endl; |
---|
| 72 | return true; |
---|
| 73 | } |
---|
[11401] | 74 | /*void DialogueManager::XMLPort(Element& xmlelement, XMLPort::Mode mode) |
---|
[11390] | 75 | { |
---|
| 76 | SUPER(DialogueManager, XMLPort, xmlelement, mode); |
---|
[11377] | 77 | |
---|
[11390] | 78 | XMLPortParam(DialogueManager, "question", setquestion, getquestion, xmlelement, mode); |
---|
[11401] | 79 | }*/ |
---|
[11393] | 80 | |
---|
[11401] | 81 | |
---|
[11393] | 82 | |
---|
[11390] | 83 | /*std::string DialogueManager::setnpc(std::string npc){ |
---|
| 84 | return npc; |
---|
| 85 | } |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | |
---|
[11413] | 89 | |
---|
[11384] | 90 | vector<std::string> DialogueManager::getanswers(void){ |
---|
[11382] | 91 | return options; |
---|
[11377] | 92 | } |
---|
| 93 | |
---|
[11384] | 94 | int DialogueManager::getnumOptions(){ |
---|
[11382] | 95 | return options.size(); |
---|
[11377] | 96 | } |
---|
| 97 | |
---|
[11390] | 98 | */ |
---|
[11371] | 99 | } |
---|