Base class for particle templates which are used to control the updating of a corresponding particle type.
More...
#include <ParticleTemplate.h>
|
|
void | Particle::Update (const GameTime *pGameTime) |
| |
|
void | Particle::Draw (SpriteBatch *pSpriteBatch) |
| |
|
void | Emitter::Update (const GameTime *pGameTime) |
| |
Base class for particle templates which are used to control the updating of a corresponding particle type.
◆ ParticleTemplate()
| ParticleTemplate::ParticleTemplate |
( |
const bool |
poolExpands = true | ) |
|
Instantiates a new particle template object.
- Parameters
-
| poolExpands | Allows the pool to dynamically create particles when it's empty. |
◆ GenerateParticles()
template<typename T >
| T* KatanaEngine::ParticleTemplate::GenerateParticles |
( |
const int |
count = 1 | ) |
|
|
inlineprotected |
Generates particles of a specific type.
- Returns
- Returns a pointer to an inactive particle matching the template type.
◆ GetInactiveParticle()
| virtual Particle* KatanaEngine::ParticleTemplate::GetInactiveParticle |
( |
| ) |
|
|
pure virtual |
Get the next available particle.
- Returns
- Returns a pointer to the particle.
◆ GetInactiveParticleOfType()
template<typename T >
| T* KatanaEngine::ParticleTemplate::GetInactiveParticleOfType |
( |
| ) |
|
|
inlineprotected |
Gets a particle of a specific type.
- Returns
- Returns a pointer to an inactive particle matching the template type.
◆ GetTexture()
| virtual Texture* KatanaEngine::ParticleTemplate::GetTexture |
( |
| ) |
|
|
inlineprotectedvirtual |
Gets the texture to render.
- Returns
- Returns a ponter to the texture.
◆ InitializeParticle()
| void ParticleTemplate::InitializeParticle |
( |
Particle * |
pParticle | ) |
|
|
protectedvirtual |
Initializes a particle.
- Parameters
-
| pParticle | The particle to initialize. |
◆ SetParticleLifespan()
| virtual void KatanaEngine::ParticleTemplate::SetParticleLifespan |
( |
const float |
seconds | ) |
|
|
inlineprotectedvirtual |
Sets the lifespan of the particle in seconds.
- Parameters
-
| seconds | The time in seconds that the particle will live. |
◆ SetTexture()
| virtual void KatanaEngine::ParticleTemplate::SetTexture |
( |
Texture * |
pTexture | ) |
|
|
inlinevirtual |
Sets the texture.
- Parameters
-
| pTexture | The texture to use. |
◆ UpdateParticle()
| virtual void KatanaEngine::ParticleTemplate::UpdateParticle |
( |
Particle * |
pParticle, |
|
|
const GameTime * |
pGameTime |
|
) |
| |
|
inlineprotectedvirtual |
Updates a particle.
- Parameters
-
| pParticle | The particle to update. |
| pGameTime | Timing values including time since last update. |
The documentation for this class was generated from the following files: