Changeset 10724 in orxonox.OLD for branches/presentation/src/world_entities/effects
- Timestamp:
- Jun 19, 2007, 8:54:28 PM (17 years ago)
- Location:
- branches/presentation/src/world_entities/effects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/effects/explosion.cc
r10695 r10724 43 43 ->addMethod("explode", Executor3<Explosion, lua_State*, float, float, float>(&Explosion::explode)) 44 44 ->addMethod("setExplosionSound", Executor1<Explosion, lua_State*, const std::string&>(&Explosion::setExplosionSound)) 45 ->addMethod("playSound", Executor0<Explosion, lua_State*>(&Explosion::playSound)) 45 46 ); 46 47 … … 123 124 this->toList(OM_DEAD_TICK); 124 125 this->lifeCycle = 0.0; 125 126 this->explosionSound.play(this->explosionSoundBuffer, OrxSound::SoundEngine::getInstance()->getEffectsVolume(), 0.01, true); 126 this->explosionSound.play(this->explosionSoundBuffer, OrxSound::SoundEngine::getInstance()->getEffectsVolume(), 0.01, false); 127 127 128 } 128 129 … … 135 136 } 136 137 138 void Explosion::playSound() 139 { 140 if (!this->explosionSound.isPlaying()) 141 this->explosionSound.play(this->explosionSoundBuffer, OrxSound::SoundEngine::getInstance()->getEffectsVolume(), 0.01, false); 142 } 137 143 138 144 /** -
branches/presentation/src/world_entities/effects/explosion.h
r10698 r10724 23 23 void explode (float x, float y, float z); /// Explode at the current position with size (x,y,z) 24 24 void setExplosionSound(const std::string& newExplosionSound){ this->explosionSoundBuffer = OrxSound::ResourceSoundBuffer(newExplosionSound); } 25 void playSound(); 25 26 26 27 Explosion ();
Note: See TracChangeset
for help on using the changeset viewer.