- Timestamp:
- Feb 20, 2018, 12:09:09 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Presentation_HS17_merge/src/modules/dialog/DialogManager.cc
r11781 r11782 33 33 34 34 namespace orxonox { 35 ManageScopedSingleton(DialogManager, ScopeID::ROOT, false); 36 35 ManageScopedSingleton(DialogManager, ScopeID::ROOT, false); 37 36 38 39 DialogManager::DialogManager()40 {41 this->currentTalk_ = nullptr;42 this->answerIds_ = nullptr;43 }44 37 45 void DialogManager::setDialog(Dialog* dialog)46 {47 this->currentTalk_ = dialog;48 this->answerIds_ = &this->currentTalk_->getAnswerIds();49 }50 38 51 //from here onward funcionality for lua axports 39 DialogManager::DialogManager() 40 { 41 this->currentTalk_ = nullptr; 42 this->answerIds_ = nullptr; 43 } 44 45 void DialogManager::setDialog(Dialog* dialog) 46 { 47 this->currentTalk_ = dialog; 48 this->answerIds_ = &this->currentTalk_->getAnswerIds(); 49 } 50 51 //from here onward funcionality for lua axports 52 52 53 53 std::string DialogManager::getQuestion() 54 54 { 55 55 return this->currentTalk_->getQuestionString(); 56 56 } 57 57 … … 63 63 std::string DialogManager::getAnswer(int index) 64 64 { 65 65 return this->currentTalk_->getAnswerString(this->answerIds_->at(index)); 66 66 } 67 67 68 68 std::string DialogManager::getPerson() 69 69 { 70 70 return this->currentTalk_->getName(); 71 71 } 72 72 … … 86 86 void DialogManager::update(int index) 87 87 { 88 89 88 this->currentTalk_->update(this->answerIds_->at(index)); 89 this->answerIds_ = &this->currentTalk_->getAnswerIds(); 90 90 } 91 91 }
Note: See TracChangeset
for help on using the changeset viewer.