CC3MortalMeshParticle is a mesh particle implementation of the CC3MortalParticleProtocol, as a particle that has a finite life. More...
#import <CC3MeshParticleSamples.h>
Public Member Functions | |
(void) | - updateBeforeTransform: |
Protected Attributes | |
ccTime | lifeSpan |
ccTime | timeToLive |
CC3MortalMeshParticle is a mesh particle implementation of the CC3MortalParticleProtocol, as a particle that has a finite life.
To make evolutionary changes to this particle, implement the updateBeforeTransform: method. In doing so, be sure to invoke the superclass implementation, which checks whether this particle is still alive or has expired. Once the superclass implementation returns, you can check the isAlive property before spending time making any further modifications.
- (void) updateBeforeTransform: | (CC3NodeUpdatingVisitor *) | visitor |
This template callback method is invoked automatically whenever the emitter is updated during a scheduled 3D scene update.
The CC3MortalMeshParticle implementation checks to see if the whether this particle is still alive or has expired, and sets the isAlive property accordingly.
You can override this method to update the evolution of the particle. You should invoke this superclass implementation and test the isAlive property before making any further modifications.
Subclasses that override this method should invoke this superclass implementation first, and should check the isAlive property prior to making any further modifications..
Implemented in CC3SprayMeshParticle.
- (ccTime) lifeSpan [protected] |
Indicates the overall life span of the particle.
This property should be set once during initialization, prior to emission.
Reimplemented from <CC3MortalParticleProtocol>.
- (ccTime) timeToLive [protected] |
Indicates the remaining time the particle has to live.
This property is automatically decremented as the particle ages. Once this property reaches zero, the particle will automatically expire itself.
Reimplemented from <CC3MortalParticleProtocol>.