Changeset 8608 for code/branches/presentation/src
- Timestamp:
- May 26, 2011, 4:58:18 PM (13 years ago)
- Location:
- code/branches/presentation/src/orxonox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/MoodManager.cc
r8351 r8608 93 93 94 94 95 std::string MoodListener::mood_s;96 97 95 MoodListener::MoodListener() 98 96 { … … 102 100 /*static*/ void MoodListener::changedMood(const std::string& mood) 103 101 { 104 mood_s = mood;105 102 for (ObjectList<MoodListener>::iterator it = ObjectList<MoodListener>::begin(); it; ++it) 106 it->moodChanged(mood _s);103 it->moodChanged(mood); 107 104 } 108 105 } -
code/branches/presentation/src/orxonox/MoodManager.h
r7163 r8608 50 50 virtual ~MoodListener() {} 51 51 52 const std::string& getMood() const { return mood_s; }53 54 52 private: 55 53 virtual void moodChanged(const std::string& mood) = 0; 56 54 57 55 static void changedMood(const std::string& mood); 58 static std::string mood_s;59 56 }; 60 57 -
code/branches/presentation/src/orxonox/sound/AmbientSound.cc
r8351 r8608 82 82 { 83 83 this->ambientSource_ = source; 84 this->moodChanged( this->getMood());84 this->moodChanged(MoodManager::getInstance().getMood()); 85 85 } 86 86 … … 89 89 if (GameMode::playsSound()) 90 90 { 91 const std::string& path = "ambient/" + MoodManager::getInstance().getMood()+ '/' + this->ambientSource_;91 const std::string& path = "ambient/" + mood + '/' + this->ambientSource_; 92 92 shared_ptr<ResourceInfo> fileInfo = Resource::getInfo(path); 93 93 if (fileInfo != NULL)
Note: See TracChangeset
for help on using the changeset viewer.