Public Member Functions | Properties

CC3MortalPointParticleEmitter Class Reference

CC3MortalPointParticleEmitter emits particles of type CC3MortalPointParticle. More...

#import <CC3PointParticles.h>

Inheritance diagram for CC3MortalPointParticleEmitter:
Inheritance graph
[legend]
Collaboration diagram for CC3MortalPointParticleEmitter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(void) - initializeMortalParticle:
(void) - initializeParticle:

Properties

ccTime maxParticleLifeSpan
ccTime minParticleLifeSpan

Detailed Description

CC3MortalPointParticleEmitter emits particles of type CC3MortalPointParticle.

A particle of type CC3MortalPointParticle has a finite life. and when that lifetime is finished, the particle will automatically expire itself.

During initialization of each particle, the lifeSpan property of the particle is set to a random value between the values of the minParticleLifeSpan and maxParticleLifeSpan properties of this emitter.

Subclasses typically override the initializeMortalParticle: method to intialize the particle further. A subclass may alternately choose to override the initializeParticle: method instead if a different method of determining the lifeSpan of the particle is required.

See the notes of the initializeParticle: and initializeMortalParticle: methods for more information.


Member Function Documentation

- (void) initializeMortalParticle: (CC3PointParticle *)  aParticle

Template method that initializes the particle after its lifeSpan property has been set.

This method is invoked automatically from the initializeParticle: method just prior to the emission of the specified particle.

This implementation does nothing. Subclasses can override to initialize the particle with further state, after the lifeSpan property of the particle has been set. Subclasses that override do not need to invoke this superclass implementation.

This method is invoked automatically by the emitter when a particle is emitted. Usually the application never has need to invoke this method directly.

- (void) initializeParticle: (CC3PointParticle *)  aParticle

Template method that initializes the particle.

This method is invoked automatically from the emitParticle method just prior to the emission of the specified particle.

This implementation sets the lifeSpan property of the particle to a random value between the values of the minParticleLifeSpan and maxParticleLifeSpan properties of this emitter, invokes the initializeMortalParticle: method to initialize the particle further, and finally invokes the initializeParticle method of the particle.

This method is invoked automatically by the emitter when a particle is emitted. Usually the application never has need to invoke this method directly.

Implements CC3PointParticleEmitter.


Property Documentation

- (ccTime) maxParticleLifeSpan [read, write, assign]

Indicates the upper limit of the range of possible particle life spans.

When a particle is emitted, the lifeSpan property will be set to a random value between the value of the minParticleLifeSpan property and the value of this property.

The initial value of this property is zero.

- (ccTime) minParticleLifeSpan [read, write, assign]

Indicates the lower limit of the range of possible particle life spans.

When a particle is emitted, the lifeSpan property will be set to a random value between the value of this property and the value of the maxParticleLifeSpan property.

The initial value of this property is zero.


The documentation for this class was generated from the following file: