Changeset 10695 in orxonox.OLD for trunk/src/world_entities/effects/explosion.cc
- Timestamp:
- Jun 14, 2007, 4:46:18 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/effects/explosion.cc
r10665 r10695 25 25 #include "particles/sprite_particles.h" 26 26 27 #include "sound/resource_sound_buffer.h" 28 #include "sound_engine.h" 29 30 27 31 ObjectListDefinition(Explosion); 28 32 CREATE_FAST_FACTORY_STATIC(Explosion); … … 38 42 //Explode ! 39 43 ->addMethod("explode", Executor3<Explosion, lua_State*, float, float, float>(&Explosion::explode)) 44 ->addMethod("setExplosionSound", Executor1<Explosion, lua_State*, const std::string&>(&Explosion::setExplosionSound)) 40 45 ); 41 46 … … 55 60 this->lifeCycle = 0.0f; 56 61 this->lifeTime = .5f; 57 62 63 this->explosionSound.setSourceNode(this); 64 58 65 } 59 66 … … 65 72 { 66 73 delete this->emitter; 67 74 if (this->explosionSound.isPlaying()) 75 this->explosionSound.stop(); 68 76 /* this is normaly done by World.cc by deleting the ParticleEngine */ 69 77 if (Explosion::explosionParticles != NULL && Explosion::objectList().size() <= 1) … … 88 96 explosion->emitter->setSize(Vector(x,y,z)); 89 97 explosion->activate(); 98 99 90 100 } 91 101 … … 113 123 this->toList(OM_DEAD_TICK); 114 124 this->lifeCycle = 0.0; 125 126 this->explosionSound.play(this->explosionSoundBuffer, OrxSound::SoundEngine::getInstance()->getEffectsVolume(), 0.01, true); 115 127 } 116 128
Note: See TracChangeset
for help on using the changeset viewer.