Changeset 5892 for code/branches/core5/src/orxonox/items
- Timestamp:
- Oct 6, 2009, 9:18:40 AM (16 years ago)
- Location:
- code/branches/core5/src/orxonox/items
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/orxonox/items/Engine.cc
r5801 r5892 37 37 #include "pickup/ModifierType.h" 38 38 #include "tools/Shader.h" 39 #include "sound/SoundBase.h"40 39 41 40 namespace orxonox … … 68 67 this->setConfigValues(); 69 68 this->registerVariables(); 70 71 this->sound_ = NULL;72 69 } 73 70 … … 80 77 if (this->boostBlur_) 81 78 this->boostBlur_->destroy(); 82 83 if(this->sound_ != NULL)84 delete this->sound_;85 79 } 86 80 } … … 102 96 XMLPortParam(Engine, "accelerationleftright", setAccelerationLeftRight, setAccelerationLeftRight, xmlelement, mode); 103 97 XMLPortParam(Engine, "accelerationupdown", setAccelerationUpDown, setAccelerationUpDown, xmlelement, mode); 104 105 XMLPortParamLoadOnly(Engine, "sound", loadSound, xmlelement, mode);106 98 } 107 99 … … 240 232 this->boostBlur_ = 0; 241 233 } 242 243 if(this->sound_ != NULL)244 this->sound_->attachToEntity(ship);245 234 } 246 235 } … … 253 242 return Vector3::ZERO; 254 243 } 255 256 void Engine::loadSound(const std::string filename)257 {258 if(filename == "") return;259 else260 {261 if(this->sound_ == NULL)262 {263 this->sound_ = new SoundBase(this->ship_);264 }265 266 this->sound_->loadFile(filename);267 this->sound_->play(true);268 }269 }270 244 } -
code/branches/core5/src/orxonox/items/Engine.h
r5738 r5892 130 130 Shader* boostBlur_; 131 131 float blurStrength_; 132 133 SoundBase* sound_;134 132 }; 135 133 }
Note: See TracChangeset
for help on using the changeset viewer.