Arcade Shooter
Public Member Functions | List of all members
KatanaEngine::Emitter Class Reference

The source of output for a particle effect. More...

#include <Emitter.h>

Public Member Functions

 Emitter (ParticleManager *pManager)
 Instantiate a particle emitter object. More...
 
 Emitter (ParticleManager *pManager, ParticleTemplate *pTemplate)
 Instantiate a particle emitter object. More...
 
 Emitter (ParticleManager *pManager, ParticleTemplate *pTemplate, const int particlesPerSecond)
 Instantiate a particle emitter object. More...
 
virtual void Update (const GameTime *pGameTime)
 Called when the game has determined that game logic needs to be processed. More...
 
virtual void SetOutput (const float output)
 Sets the output percentage for the emitter. More...
 
virtual void SetPosition (const Vector2 position)
 Sets the position of the emitter. More...
 
virtual void SetTemplate (ParticleTemplate *pTemplate)
 Sets the template that the particles will use to update and for initialization. More...
 
virtual void SetParticlesPerSecond (float particlesPerSecond)
 Sets the number of particles that will be emitted per second, when the output is set to one. More...
 

Detailed Description

The source of output for a particle effect.

Constructor & Destructor Documentation

◆ Emitter() [1/3]

KatanaEngine::Emitter::Emitter ( ParticleManager pManager)

Instantiate a particle emitter object.

Parameters
pManagerA pointer to the particle manager that will manage emitted particles.

◆ Emitter() [2/3]

KatanaEngine::Emitter::Emitter ( ParticleManager pManager,
ParticleTemplate pTemplate 
)

Instantiate a particle emitter object.

Parameters
pManagerA pointer to the particle manager that will manage emitted particles.
pTemplateA pointer to the template that the particles will use to update and for initialization.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Emitter() [3/3]

KatanaEngine::Emitter::Emitter ( ParticleManager pManager,
ParticleTemplate pTemplate,
const int  particlesPerSecond 
)

Instantiate a particle emitter object.

Parameters
pManagerA pointer to the particle manager that will manage emitted particles.
pTemplateA pointer to the template that the particles will use to update and for initialization.
particlesPerSecondThe number of particles that will be emitted per second.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Member Function Documentation

◆ SetOutput()

virtual void KatanaEngine::Emitter::SetOutput ( const float  output)
inlinevirtual

Sets the output percentage for the emitter.

Parameters
outputThe value for the output. Zero is off, and one is full output.
Remarks
An output greater than one will work, and will produce an output beyond 100%. Doing this can be usefull for testing but is not recommended for actual gameplay.

◆ SetParticlesPerSecond()

virtual void KatanaEngine::Emitter::SetParticlesPerSecond ( float  particlesPerSecond)
inlinevirtual

Sets the number of particles that will be emitted per second, when the output is set to one.

Parameters
particlesPerSecondThe number of particles per second to emit.
See also
SetOutput()

◆ SetPosition()

void KatanaEngine::Emitter::SetPosition ( const Vector2  position)
virtual

Sets the position of the emitter.

Parameters
positionThe new position.
Remarks
By default, the position of particles emitted will be interpolated between the emitter's current and previous position. To cancel this effect, you can simply call SetPosition() twice with the same position value.

◆ SetTemplate()

virtual void KatanaEngine::Emitter::SetTemplate ( ParticleTemplate pTemplate)
inlinevirtual

Sets the template that the particles will use to update and for initialization.

Parameters
pTemplateA pointer to the template.

◆ Update()

void KatanaEngine::Emitter::Update ( const GameTime pGameTime)
virtual

Called when the game has determined that game logic needs to be processed.

Parameters
pGameTimeTiming values including time since last update.

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