Changeset 6619 in orxonox.OLD for trunk/src/lib/particles/particle_emitter.cc
- Timestamp:
- Jan 19, 2006, 6:23:56 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/particles/particle_emitter.cc
r6512 r6619 19 19 20 20 #include "particle_system.h" 21 #include "particle_engine.h"22 21 23 22 #include "load_param.h" … … 44 43 this->setEmissionVelocity(velocity); 45 44 46 ParticleEngine::getInstance()->addEmitter(this);47 45 } 48 46 … … 57 55 if (root != NULL) 58 56 this->loadParams(root); 59 60 ParticleEngine::getInstance()->addEmitter(this);61 57 } 62 58 … … 68 64 ParticleEmitter::~ParticleEmitter () 69 65 { 70 ParticleEngine::getInstance()->removeEmitter(this);71 66 } 72 67 … … 84 79 this->setSize(PARTICLE_EMITTER_DEFAULT_SIZE); 85 80 81 this->system = NULL; 82 86 83 this->saveTime = 0.0; 87 84 } … … 118 115 119 116 LoadParam(root, "emission-direction", this, ParticleEmitter, setDirection); 117 } 118 119 void ParticleEmitter::setSystem(ParticleSystem* system) 120 { 121 if (system != NULL) 122 system->addEmitter(this); 123 else if (this->system != NULL) 124 this->system->removeEmitter(this); 125 this->system = system; 120 126 } 121 127
Note: See TracChangeset
for help on using the changeset viewer.