#include "core/CoreIncludes.h" #include "core/LuaState.h" #include "core/GUIManager.h" #include "core/class/Identifier.h" #include "core/singleton/ScopedSingletonIncludes.h" #include "network/Host.h" #include "network/NetworkFunctionIncludes.h" #include "DialogueManager.h" #include "DialoguePrereqs.h" #include #include #include "core/XMLPort.h" namespace orxonox { //ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false); RegisterAbstractClass(DialogueManager).inheritsFrom(); DialogueManager* DialogueManager::singletonPtr_s =nullptr; DialogueManager::DialogueManager(Context* context): BaseObject(context){ orxout() << "Dialog Konstruktor" << endl; RegisterObject(DialogueManager); } /** * @brief set the config values in the orxonox.ini file */ void DialogueManager::setquestion(std::string q){ question=q; } std::string DialogueManager::getquestion(void){ orxout() << question << endl; return question; } void DialogueManager::setanswers1(std::string a1){ orxout() << "setanswers1" << endl; this->a1=a1; orxout() << "A1 is " << a1; } void DialogueManager::setanswers2(std::string a2){ this->a2=a2; } std::string DialogueManager::getanswers1(void){ orxout() << "getanswers1" << endl; return a1; } std::string DialogueManager::getanswers2(void){ return a2; } bool DialogueManager::a1clicked(void){ orxout() << "a1 clicked" << endl; return true; } bool DialogueManager::a2clicked(void){ orxout() << "a2 clicked" << endl; return true; } /*void DialogueManager::XMLPort(Element& xmlelement, XMLPort::Mode mode) { SUPER(DialogueManager, XMLPort, xmlelement, mode); XMLPortParam(DialogueManager, "question", setquestion, getquestion, xmlelement, mode); }*/ /*std::string DialogueManager::setnpc(std::string npc){ return npc; } vector DialogueManager::getanswers(void){ return options; } int DialogueManager::getnumOptions(){ return options.size(); } */ }