8 #include "../Core/C_Vec2.h"
9 #include "../Core/C_Utilities.h"
10 #include "../Core/C_Timer.h"
13 #define MAX_NUMBER_OF_PARTICLES 100
68 SDL_Colour minTint, SDL_Colour maxTint);
85 void draw(SDL_Renderer* renderer);
void setEmitting(bool emit)
Set the value of the emit boolean.
Definition: PS_ParticleEffect.cpp:113
~PS_ParticleEffect()
Destructs the ParticleEffect Object deleting the Particle Object from memory.
Definition: PS_ParticleEffect.cpp:49
bool getDead()
Get the value of dead.
Definition: PS_ParticleEffect.cpp:138
void setMoveSpeed(float moveSpeed)
Set the value of the movement speed.
Definition: PS_ParticleEffect.cpp:118
Handles Particle objects and Particle Effect functions.
Definition: PS_ParticleEffect.h:19
C_Timer * getLifeSpan()
Get the timer for the lifespan of the effect.
Definition: PS_ParticleEffect.cpp:128
float scale
The scale of the particles.
Definition: PS_ParticleEffect.h:141
void draw(SDL_Renderer *renderer)
Draws the ParticleEffect.
Definition: PS_ParticleEffect.cpp:99
void update(float dt)
A function that updates the ParticleEffect.
Definition: PS_ParticleEffect.cpp:59
void setDead(bool dead)
Set the value of dead.
Definition: PS_ParticleEffect.cpp:133
C_Texture * texture
A pointer to the Texture of the particles.
Definition: PS_ParticleEffect.h:133
Contains the Vec2 structure with functions and overloaded operators.
Definition: C_Vec2.h:7
PS_ParticleEffect(C_Texture *texture, C_Vec2 emitter, bool emit, float moveSpeed, float scale)
Constructs the ParticleEffect Object.
Definition: PS_ParticleEffect.cpp:3
bool tint
A boolean for if the texture will be tinted.
Definition: PS_ParticleEffect.h:147
SDL_Colour maxTint
The max colour tint.
Definition: PS_ParticleEffect.h:149
void setParticleScale(float scale)
Set the scale of the particles.
Definition: PS_ParticleEffect.cpp:123
bool dead
A boolean for if the particle effect should be deleted.
Definition: PS_ParticleEffect.h:145
std::vector< PS_Particle * > particles
A vector of Particle objects.
Definition: PS_ParticleEffect.h:131
Handles timer functions.
Definition: C_Timer.h:7
SDL_Colour minTint
The min colour tint.
Definition: PS_ParticleEffect.h:151
C_Timer * lifeSpan
A timer for the lifespan of the particle effect.
Definition: PS_ParticleEffect.h:143
void makeNewParticles()
Creates the new Particle objects.
Definition: PS_ParticleEffect.cpp:143
bool emit
A boolean for if the ParticleEffect should emit.
Definition: PS_ParticleEffect.h:139
C_Vec2 emitter
The position of the Particle emitter.
Definition: PS_ParticleEffect.h:137
void setEmitter(C_Vec2 emitter)
Set the position of the emitter.
Definition: PS_ParticleEffect.cpp:108
Creates a Texture for use with a renderer.
Definition: C_Texture.h:13
float moveSpeed
The move speed of the particles.
Definition: PS_ParticleEffect.h:135