Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 19, 2006, 4:08:04 PM (18 years ago)
Author:
marcscha
Message:

addition of local travel speed, removal of path hacks

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  
    7373
    7474  this->lifeCycle += dt/this->lifeSpan;
    75   if  (unlikely(this->lifeCycle >= 1))
     75  if  (this->lifeCycle >= 1)
    7676  {
    7777    this->removeNode();
     78    this->hide();
     79    this->system->removeEmitter(this->emitter);
     80    this->emitter->stop();
     81    this->emitter->setSystem(NULL);
     82    this->started = false;
    7883  }
    7984  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  
    88#define _EMITTER_NODE_H
    99
    10 #include "p_node.h"
     10#include "world_entity.h"
    1111#include "dot_emitter.h"
     12#include "particle_system.h"
    1213
    1314// FORWARD DECLARATION
     
    1718
    1819//! A class to handle an Emitter.
    19 class EmitterNode : public PNode
     20class EmitterNode : public WorldEntity
    2021{
    2122  ObjectListDeclaration(EmitterNode);
     
    3132  inline void setVelocity(Vector velocity) { this->velocity = velocity;};
    3233
    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);} ;
    3435  void setLifetime( float lifeTime) { this->lifeSpan  = lifeTime;};
    3536
Note: See TracChangeset for help on using the changeset viewer.