- Timestamp:
- Nov 30, 2017, 3:35:25 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Dialog_HS17/src/modules/dialog/DialogManager.cc
r11611 r11612 2 2 #include "core/CoreIncludes.h" 3 3 #include "core/singleton/ScopedSingletonIncludes.h" 4 #include <string> 4 5 5 namespace orxonox 6 { 7 ManageScopedSingleton(DialogManager, ScopeID::ROOT, false); 6 namespace orxonox { 7 ManageScopedSingleton(DialogManager, ScopeID::ROOT, false); 8 8 9 9 RegisterAbstractClass(DialogManager).inheritsFrom<Listable>(); 10 11 DialogManager::DialogManager() 12 { 13 this->currentTalk_ = nullptr; 14 } 10 15 11 DialogManager::DialogManager() 12 { 13 RegisterObject(DialogManager); 14 15 this->currentTalk_ = NULL; 16 } 17 18 void DialogManager::setDialog(Dialog* dialog) 16 void DialogManager::setDialog(Dialog* dialog) 19 17 { 20 18 this->currentTalk_ = dialog; 21 19 } 22 20 23 const Dialog* DialogManager::getCurrentDialog() 24 { 25 return this->currentTalk_; 26 } 27 28 bool DialogManager::empty() 29 { 30 if(this->currentTalk_ == NULL) 31 { 32 return true; 33 } 34 else 35 { 36 return false; 37 } 38 } 21 //from here onward funcionality for lua axports 22 23 std::string DialogManager::getQuestion() 24 { 25 return this->currentTalk_->getQuestionString(); 26 } 27 28 /* 29 std::vector<std::string> DialogManager::getAnswers() 30 { 31 // lua hat komisch arrays (eigentlich tables), wie implementiert man answers so das man nacher den key der gegeben antwort a 32 // hat um ihn fuer update zu benutzen? 33 } 34 */ 39 35 }
Note: See TracChangeset
for help on using the changeset viewer.