Changeset 11382 for code/branches/Dialogue_FS17
- Timestamp:
- Mar 30, 2017, 3:14:02 PM (8 years ago)
- Location:
- code/branches/Dialogue_FS17/src/modules
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Dialogue_FS17/src/modules/CMakeLists.txt
r11052 r11382 26 26 ################ Sub Directories ################ 27 27 28 ADD_SUBDIRECTORY(dialogue) 28 29 ADD_SUBDIRECTORY(designtools) 29 30 ADD_SUBDIRECTORY(gametypes) -
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc
r11377 r11382 7 7 #include "network/NetworkFunctionIncludes.h" 8 8 #include "DialogueManager.h" 9 #include "DialoguePrereqs.h" 10 #include <vector> 11 #include <string> 9 12 10 13 namespace orxonox { 11 RegisterClass(DialogueManager); 14 ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false); 15 RegisterClass(DialogueManager); 12 16 13 DialogueManager::DialogueManager() : OrxonoxOverlay(context){17 DialogueManager::DialogueManager(){ 14 18 RegisterObject(DialogueManager); 15 19 16 20 } 17 ~DialogueManager(){}21 18 22 19 std::string setnpc(std::string npc){23 /*std::string setnpc(std::string npc){ 20 24 return npc; 21 25 } 22 26 23 27 void setquestion(std::string question){ 24 this->question=question;28 question=question; 25 29 } 26 30 27 31 std::string getquestion(void){ 28 return this->question;32 return question; 29 33 } 30 34 31 35 void setanswers(std::string option1, std::string option2, std::string option3){ 32 option [0]=option1;33 option [1]=option2;34 option [2]=option3;36 options.at(0)=option1; 37 options.at(1)=option2; 38 options.at(2)=option3; 35 39 } 36 40 37 std::string[]getanswers(void){38 return option [];41 vector<std::string> getanswers(void){ 42 return options; 39 43 } 40 44 41 int getnumOptions( options){42 return options. length();45 int getnumOptions(){ 46 return options.size(); 43 47 } 44 48 … … 48 52 49 53 XMLPortParam(DialogueManager, "question", setquestion, getquestion, xmlelement, mode); 50 } 54 }*/ 51 55 } -
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h
r11377 r11382 6 6 #include "network/Host.h" 7 7 #include "network/NetworkFunctionIncludes.h" 8 #include "DialoguePrereqs.h" 9 #include "util/Singleton.h" 10 #include <string> 11 #include <vector> 12 #include "OrxonoxPrereqs.h" 8 13 9 namespace orxonox{ 10 class DialogueManager { 11 DialogueManager::DialogueManager(); 12 ~DialogueManager(); 13 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 14 //tolua_begin 15 namespace orxonox 16 //tolua_end 17 {//toluaexport 18 class _OrxonoxExport DialogueManager : public Singleton<DialogueManager>{ 19 friend class Singleton<DialogueManager>; 20 //tolua_begin 21 //public: 14 22 15 public: 23 DialogueManager(); 24 static DialogueManager& getInstance() { return Singleton<DialogueManager>::getInstance(); } // tolua_export 25 /*virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 26 16 27 void setquestion(std::string question); 17 28 std::string getquestion(void); 29 18 30 std::string setnpc(std::string npc); 31 19 32 void setanswers(std::string option1, std::string option2, std::string option3); 20 std::string[] getanswers(void); 21 int getnumOptions(options); 33 std::vector <std::string> getanswers(void); 34 35 int getnumOptions(); 22 36 23 37 24 38 std::string question; 25 39 std::string npc; 26 std::string[] options; 40 std::vector<std::string> options; 41 //tolua_end 42 */ 43 private: 44 static DialogueManager* singletonPtr_s; 27 45 28 29 30 }; 46 };//toluaexport 31 47 }
Note: See TracChangeset
for help on using the changeset viewer.