Changeset 6619 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 19, 2006, 6:23:56 PM (19 years ago)
- Location:
- trunk/src/world_entities/projectiles
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/projectiles/bomb.cc
r6512 r6619 25 25 #include "object_manager.h" 26 26 27 #include "particle_engine.h"28 27 #include "particle_emitter.h" 29 28 #include "particle_system.h" -
trunk/src/world_entities/projectiles/guided_missile.cc
r6434 r6619 23 23 #include "class_list.h" 24 24 25 #include "particle_engine.h"26 25 #include "particle_emitter.h" 27 26 #include "particle_system.h" … … 113 112 } 114 113 115 ParticleEngine::getInstance()->addConnection(this->emitter,GuidedMissile::trailParticles);114 this->emitter->setSystem(GuidedMissile::trailParticles); 116 115 117 116 this->updateNode(0); … … 123 122 void GuidedMissile::deactivate() 124 123 { 125 ParticleEngine::getInstance()->breakConnections(this->emitter);124 this->emitter->setSystem(NULL); 126 125 this->lifeCycle = 0.0; 127 126 … … 184 183 PRINTF(5)("DESTROY GuidedMissile\n"); 185 184 this->lifeCycle = .95; //!< @todo calculate this usefully. 186 ParticleEngine::getInstance()->breakConnection(this->emitter, GuidedMissile::trailParticles); 187 ParticleEngine::getInstance()->addConnection(this->emitter, GuidedMissile::explosionParticles); 185 this->emitter->setSystem(GuidedMissile::explosionParticles); 188 186 189 187 this->emitter->setEmissionRate(1000.0); -
trunk/src/world_entities/projectiles/laser.cc
r6434 r6619 24 24 #include "model.h" 25 25 26 #include "particle_engine.h"27 26 #include "particle_emitter.h" 28 27 #include "particle_system.h" … … 93 92 void Laser::deactivate() 94 93 { 95 ParticleEngine::getInstance()->breakConnections(this->emitter); 94 assert (Laser::explosionParticles != NULL); 95 Laser::explosionParticles->removeEmitter(this->emitter); 96 96 this->lifeCycle = 0.0; 97 97 … … 130 130 PRINTF(5)("DESTROY Laser\n"); 131 131 this->lifeCycle = .95; //!< @todo calculate this usefully. 132 ParticleEngine::getInstance()->addConnection(this->emitter, Laser::explosionParticles); 132 133 this->emitter->setSystem(Laser::explosionParticles); 133 134 } 134 135 -
trunk/src/world_entities/projectiles/rocket.cc
r6434 r6619 23 23 #include "class_list.h" 24 24 25 #include "particle_engine.h"26 25 #include "particle_emitter.h" 27 26 #include "particle_system.h" … … 110 109 } 111 110 112 ParticleEngine::getInstance()->addConnection(this->emitter,Rocket::trailParticles);111 this->emitter->setSystem(Rocket::trailParticles); 113 112 114 113 this->updateNode(0); … … 120 119 void Rocket::deactivate() 121 120 { 122 ParticleEngine::getInstance()->breakConnections(this->emitter);121 this->emitter->setSystem(NULL); 123 122 this->lifeCycle = 0.0; 124 123 this->toList(OM_NULL); … … 158 157 PRINTF(5)("DESTROY Rocket\n"); 159 158 this->lifeCycle = .95; //!< @todo calculate this usefully. 160 ParticleEngine::getInstance()->breakConnection(this->emitter, Rocket::trailParticles); 161 ParticleEngine::getInstance()->addConnection(this->emitter, Rocket::explosionParticles); 159 this->emitter->setSystem(Rocket::explosionParticles); 162 160 163 161 this->emitter->setEmissionRate(1000.0); -
trunk/src/world_entities/projectiles/test_bullet.cc
r6434 r6619 23 23 #include "class_list.h" 24 24 25 #include "particle_engine.h"26 25 #include "particle_emitter.h" 27 26 #include "particle_system.h" … … 105 104 } 106 105 107 ParticleEngine::getInstance()->addConnection(this->emitter,TestBullet::trailParticles);106 this->emitter->setSystem(TestBullet::trailParticles); 108 107 109 108 this->emitter->setEmissionRate(20.0); … … 114 113 void TestBullet::deactivate() 115 114 { 116 ParticleEngine::getInstance()->breakConnections(this->emitter);115 this->emitter->setSystem(NULL); 117 116 this->lifeCycle = 0.0; 118 117 this->toList(OM_NULL); … … 157 156 PRINTF(5)("DESTROY TestBullet\n"); 158 157 this->lifeCycle = .95; //!< @todo calculate this usefully. 159 ParticleEngine::getInstance()->breakConnection(this->emitter, TestBullet::trailParticles); 160 ParticleEngine::getInstance()->addConnection(this->emitter, TestBullet::explosionParticles); 158 this->emitter->setSystem(TestBullet::explosionParticles); 161 159 162 160 this->emitter->setEmissionRate(30.0);
Note: See TracChangeset
for help on using the changeset viewer.