Changeset 10098 in orxonox.OLD for branches/playability/src/world_entities/particles
- Timestamp:
- Dec 19, 2006, 4:08:04 PM (18 years ago)
- Location:
- branches/playability/src/world_entities/particles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/particles/emitter_node.cc
r10078 r10098 73 73 74 74 this->lifeCycle += dt/this->lifeSpan; 75 if ( unlikely(this->lifeCycle >= 1))75 if (this->lifeCycle >= 1) 76 76 { 77 77 this->removeNode(); 78 this->hide(); 79 this->system->removeEmitter(this->emitter); 80 this->emitter->stop(); 81 this->emitter->setSystem(NULL); 82 this->started = false; 78 83 } 79 84 PRINTF(0)("Coordinate Update EmitterNode: (%f,%f,%f) -> (%f,%f,%f)\n",this->getAbsCoor().x,this->getAbsCoor().y,this->getAbsCoor().z,this->velocity.x,this->velocity.y,this->velocity.z); -
branches/playability/src/world_entities/particles/emitter_node.h
r10078 r10098 8 8 #define _EMITTER_NODE_H 9 9 10 #include " p_node.h"10 #include "world_entity.h" 11 11 #include "dot_emitter.h" 12 #include "particle_system.h" 12 13 13 14 // FORWARD DECLARATION … … 17 18 18 19 //! A class to handle an Emitter. 19 class EmitterNode : public PNode20 class EmitterNode : public WorldEntity 20 21 { 21 22 ObjectListDeclaration(EmitterNode); … … 31 32 inline void setVelocity(Vector velocity) { this->velocity = velocity;}; 32 33 33 inline void setupParticle(DotEmitter* emitter, ParticleSystem* system) { this->emitter = emitter; this->system = system; } ;34 inline void setupParticle(DotEmitter* emitter, ParticleSystem* system) { this->emitter = emitter; this->system = system; this->system->setLifeSpan(this->lifeSpan);} ; 34 35 void setLifetime( float lifeTime) { this->lifeSpan = lifeTime;}; 35 36
Note: See TracChangeset
for help on using the changeset viewer.