C# Class Nez.Particles.Particle

the internal fields are required for the ParticleEmitter to be able to render the Particle
Show file Open project: prime31/Nez

Public Methods

Method Description
initialize ( ParticleEmitterConfig emitterConfig, Vector2 spawnPosition ) : void
update ( ParticleEmitterConfig emitterConfig, ParticleCollisionConfig &collisionConfig, Vector2 rootPosition ) : bool

updates the particle. Returns true when the particle is no longer alive

Private Methods

Method Description
calculateCollisionResponseVelocity ( float friction, float elasticity, Vector2 &minimumTranslationVector ) : void

given the relative velocity between the two objects and the MTV this method modifies the relativeVelocity to make it a collision response.

Method Details

initialize() public method

public initialize ( ParticleEmitterConfig emitterConfig, Vector2 spawnPosition ) : void
emitterConfig ParticleEmitterConfig
spawnPosition Vector2
return void

update() public method

updates the particle. Returns true when the particle is no longer alive
public update ( ParticleEmitterConfig emitterConfig, ParticleCollisionConfig &collisionConfig, Vector2 rootPosition ) : bool
emitterConfig ParticleEmitterConfig Emitter config.
collisionConfig ParticleCollisionConfig
rootPosition Vector2
return bool