Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc @ 11413

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

Buttons

File size: 2.0 KB
Line 
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
15namespace orxonox {
16        //ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false);
17        RegisterAbstractClass(DialogueManager).inheritsFrom<BaseObject>();
18
19
20
21        DialogueManager* DialogueManager::singletonPtr_s =nullptr;
22
23        DialogueManager::DialogueManager(Context* context): BaseObject(context){
24                orxout() << "Dialog Konstruktor" << endl;
25                RegisterObject(DialogueManager);
26               
27               
28
29        }
30       
31
32        /**
33     * @brief set the config values in the orxonox.ini file
34     */
35   
36
37    void DialogueManager::setquestion(std::string q){
38                question=q;
39               
40        }
41
42        std::string DialogueManager::getquestion(void){
43                orxout() << question << endl;
44                return question;
45        }
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        }
74        /*void DialogueManager::XMLPort(Element& xmlelement, XMLPort::Mode mode)
75    {
76        SUPER(DialogueManager, XMLPort, xmlelement, mode);
77
78        XMLPortParam(DialogueManager, "question", setquestion, getquestion, xmlelement, mode);
79    }*/
80
81       
82
83        /*std::string DialogueManager::setnpc(std::string npc){
84                return npc;
85        }
86
87       
88
89       
90        vector<std::string> DialogueManager::getanswers(void){
91                return options;
92        }
93
94        int DialogueManager::getnumOptions(){
95                return options.size();
96        }
97
98        */
99}
Note: See TracBrowser for help on using the repository browser.