Property | Type | Description | |
---|---|---|---|
maxAcceleration | float | ||
maxInitialSpeed | float | ||
maxLifetime | float | ||
maxNumParticles | int | ||
maxRotationSpeed | float | ||
maxScale | float | ||
minAcceleration | float | ||
minInitialSpeed | float | ||
minLifetime | float | ||
minNumParticles | int | ||
minRotationSpeed | float | ||
minScale | float | ||
spriteBlendMode | SpriteBlendMode | ||
textureFilename | string |
Method | Description | |
---|---|---|
AddParticles ( Vector2 where ) : void |
AddParticles's job is to add an effect somewhere on the screen. If there aren't enough particles in the freeParticles queue, it will use as many as it can. This means that if there not enough particles available, calling AddParticles will have no effect.
|
|
Draw ( |
overriden from DrawableGameComponent, Draw will use Engine's sprite batch to render all of the active particles.
|
|
Initialize ( ) : void |
override the base class's Initialize to do some additional work; we want to call InitializeConstants to let subclasses set the constants that will be used. also, the particle array and freeParticles queue are set up here.
|
|
Update ( |
overriden from DrawableGameComponent, Update will update all of the active particles.
|
Method | Description | |
---|---|---|
InitializeConstants ( ) : void | ||
InitializeParticle ( |
||
LoadContent ( ) : void |
Override the base class LoadContent to load the texture. once it's loaded, calculate the origin.
|
|
ParticleSystem ( |
Constructs a new ParticleSystem.
|
|
PickRandomDirection ( ) : Vector2 |
PickRandomDirection is used by InitializeParticles to decide which direction particles will move. The default implementation is a random vector in a circular pattern.
|
public AddParticles ( Vector2 where ) : void | ||
where | Vector2 | where the particle effect should be created |
return | void |
public Draw ( |
||
gameTime | ||
return | void |
protected abstract InitializeConstants ( ) : void | ||
return | void |
protected InitializeParticle ( |
||
p | the particle to initialize | |
where | Vector2 | the position on the screen that the particle should be /// |
return | void |
protected ParticleSystem ( |
||
game | The host for this particle system. The game keeps the /// content manager and sprite batch for us. | |
howManyEffects | int | the maximum number of particle effects that /// are expected on screen at once. |
return | System |
public Update ( |
||
gameTime | ||
return | void |