Changeset 11406 for code/branches/Dialogue_FS17/src/modules
- Timestamp:
- Apr 27, 2017, 3:36:57 PM (8 years ago)
- Location:
- code/branches/Dialogue_FS17/src/modules/dialogue
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Dialogue_FS17/src/modules/dialogue/CMakeLists.txt
r11401 r11406 8 8 MODULE 9 9 FIND_HEADER_FILES 10 TOLUA_FILES 11 DialogueManager.h 10 12 LINK_LIBRARIES 11 13 orxonox -
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc
r11401 r11406 22 22 23 23 DialogueManager::DialogueManager(Context* context): BaseObject(context){ 24 orxout() << "Dialog Konstruktor" << endl; 24 25 RegisterObject(DialogueManager); 25 26 … … 34 35 35 36 36 void DialogueManager::setquestion(std::string question){ 37 question=question; 37 void DialogueManager::setquestion(std::string q){ 38 orxout() << "setquestion" << endl; 39 question=q; 40 orxout() << "Question is " << question; 38 41 } 39 42 40 43 std::string DialogueManager::getquestion(void){ 44 orxout() << question << endl; 41 45 return question; 42 46 } -
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h
r11401 r11406 14 14 #include "core/EventIncludes.h" 15 15 16 //tolua_begin 17 namespace orxonox 18 //tolua_end 19 {//toluaexport 20 class _OrxonoxExport DialogueManager : public Singleton<DialogueManager>, public BaseObject 21 { 16 17 namespace orxonox //tolua_export 18 19 {//tolua_export 20 class _OrxonoxExport DialogueManager //tolua_export 21 : public Singleton<DialogueManager>, public BaseObject 22 {//tolua_export 22 23 friend class Singleton<DialogueManager>; 23 //tolua_begin24 24 25 public: 25 26 26 27 27 DialogueManager(Context* context); // tolua_export28 DialogueManager(Context* context); 28 29 29 30 30 static DialogueManager& getInstance() { return Singleton<DialogueManager>::getInstance(); } 31 static DialogueManager& getInstance() { return Singleton<DialogueManager>::getInstance(); } //tolua_export 31 32 32 void setquestion(std::string question); 33 std::string getquestion(void); 33 void setquestion(std::string question); //tolua_export 34 std::string getquestion(void); //tolua_export 34 35 35 36 … … 48 49 std::string npc; 49 50 std::vector<std::string> options; 50 //tolua_end51 51 52 */ 52 53 private: … … 54 55 static DialogueManager* singletonPtr_s; 55 56 56 };//toluaexport 57 } 57 };//tolua_export 58 }//tolua_export 59 -
code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.cc
r11401 r11406 3 3 #include "core/CoreIncludes.h" 4 4 #include "core/GUIManager.h" 5 #include "overlays/OrxonoxOverlay.h" 5 6 6 7 … … 16 17 RegisterObject(NextQuestion); 17 18 orxout() << "Klasse aufgerufen" << endl; 19 DialogueManager* d = new DialogueManager(context); 20 18 21 19 22 } 20 23 21 24 void NextQuestion::setquestion(std::string question){ 22 question=question;25 this->question=question; 23 26 } 24 27 25 28 std::string NextQuestion::getquestion(void){ 29 orxout() << question; 26 30 return question; 27 31 } … … 47 51 orxout() << "bTriggered is " << bTriggered << endl; 48 52 49 for (DialogueManager* hud : ObjectList<DialogueManager>()) 50 m = hud; 51 m->setquestion(question); 52 //orxout() << " 1 " << mystring << endl; 53 //for (DialogueManager* hud : ObjectList<DialogueManager>()) 54 //m = hud; 55 56 DialogueManager& m = DialogueManager::getInstance(); 57 58 m.setquestion(question); 59 orxout() << " 1 " << endl; 60 61 62 OrxonoxOverlay::showOverlay("Dialogue"); 63 53 64 return false; 54 65 }
Note: See TracChangeset
for help on using the changeset viewer.