Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Singletonkram figured out

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