Changeset 11384 for code/branches/Dialogue_FS17
- Timestamp:
- Mar 30, 2017, 3:55:28 PM (8 years ago)
- Location:
- code/branches/Dialogue_FS17/src/modules/dialogue
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc
r11382 r11384 13 13 namespace orxonox { 14 14 ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false); 15 RegisterClass (DialogueManager);15 RegisterClassNoArgs(DialogueManager); 16 16 17 17 DialogueManager::DialogueManager(){ 18 18 RegisterObject(DialogueManager); 19 this->setConfigValues(); 19 20 20 21 } 21 22 22 23 /*std::string setnpc(std::string npc){ 23 /** 24 * @brief set the config values in the orxonox.ini file 25 */ 26 void DialogueManager::setConfigValues() 27 { 28 //SetConfigValue(question,std::string).description("Question"); 29 30 } 31 /*std::string DialogueManager::setnpc(std::string npc){ 24 32 return npc; 25 33 } 26 34 27 void setquestion(std::string question){35 void DialogueManager::setquestion(std::string question){ 28 36 question=question; 29 37 } 30 38 31 std::string getquestion(void){39 std::string DialogueManager::getquestion(void){ 32 40 return question; 33 41 } 34 42 35 void setanswers(std::string option1, std::string option2, std::string option3){43 void DialogueManager::setanswers(std::string option1, std::string option2, std::string option3){ 36 44 options.at(0)=option1; 37 45 options.at(1)=option2; … … 39 47 } 40 48 41 vector<std::string> getanswers(void){49 vector<std::string> DialogueManager::getanswers(void){ 42 50 return options; 43 51 } 44 52 45 int getnumOptions(){53 int DialogueManager::getnumOptions(){ 46 54 return options.size(); 47 55 } -
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h
r11382 r11384 11 11 #include <vector> 12 12 #include "OrxonoxPrereqs.h" 13 #include "core/config/Configurable.h" 13 14 14 15 //tolua_begin … … 16 17 //tolua_end 17 18 {//toluaexport 18 class _OrxonoxExport DialogueManager : public Singleton<DialogueManager>{ 19 class _OrxonoxExport DialogueManager : public Singleton<DialogueManager>, public Configurable 20 { 19 21 friend class Singleton<DialogueManager>; 20 22 //tolua_begin 21 //public:23 public: 22 24 23 DialogueManager(); 24 static DialogueManager& getInstance() { return Singleton<DialogueManager>::getInstance(); } // tolua_export 25 DialogueManager(); // tolua_export 26 static DialogueManager& getInstance() { return Singleton<DialogueManager>::getInstance(); } 27 void setConfigValues(); 25 28 /*virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 26 29 … … 36 39 37 40 38 std::string question;41 39 42 std::string npc; 40 43 std::vector<std::string> options; … … 42 45 */ 43 46 private: 47 std::string question; 44 48 static DialogueManager* singletonPtr_s; 45 49
Note: See TracChangeset
for help on using the changeset viewer.