Creates a Particle object. More...
#include <Particle.h>

Public Member Functions | |
| JAM_Particle (JAM_Texture *texture, float scaleValue, JAM_Vec2 direction, float moveSpeed, JAM_Vec2 position) | |
| ~JAM_Particle () | |
| void | update (float dt) |
| void | draw (SDL_Renderer *renderer) |
| void | setPosition (JAM_Vec2 position) |
| void | setPosition (float x, float y) |
| void | setScale (float scaleValue) |
| void | move (JAM_Vec2 movement) |
| void | moveX (float movement) |
| void | moveY (float movement) |
| void | setMoveSpeed (float moveSpeed) |
| void | setDirection (JAM_Vec2 direction) |
| float | getMoveSpeed () |
| JAM_Vec2 | getPosition () |
| JAM_Vec2 | getDirection () |
| float | getScale () |
Private Attributes | |
| JAM_Texture * | texture |
| JAM_Vec2 | direction |
| JAM_Vec2 | position |
| float | scaleValue |
| float | moveSpeed |
Creates a Particle object.
| JAM_Particle::JAM_Particle | ( | JAM_Texture * | texture, |
| float | scaleValue, | ||
| JAM_Vec2 | direction, | ||
| float | moveSpeed, | ||
| JAM_Vec2 | position | ||
| ) |
Constructs the Particle Object.
| square | A pointer to the Texture. |
| scaleValue | The scale of the Particle. |
| direction | The direction of the Particle. |
| moveSpeed | The move speed of the Particle. |
| position | The position of the Particle. |
| JAM_Particle::~JAM_Particle | ( | ) |
Destructs the Particle Object deleting the Particle Object from memory.
| void JAM_Particle::draw | ( | SDL_Renderer * | renderer | ) |
Draw the Entity to the screen.
| renderer | A pointer to the renderer. |

| JAM_Vec2 JAM_Particle::getDirection | ( | ) |
Getter # Gets the direction of the Particle.
| float JAM_Particle::getMoveSpeed | ( | ) |
Getter # Gets the moveSpeed of the Particle.
| JAM_Vec2 JAM_Particle::getPosition | ( | ) |
Getter # Gets the position of the Particle.
| float JAM_Particle::getScale | ( | ) |
Getter # Gets the scale of the Particle.
| void JAM_Particle::move | ( | JAM_Vec2 | movement | ) |
Move the Particle.
| movement | The amount to move by. |

| void JAM_Particle::moveX | ( | float | movement | ) |
Move the Particle along the X axis.
| movement | The amount to move by. |
| void JAM_Particle::moveY | ( | float | movement | ) |
Move the Particle along the Y axis.
| movement | The amount to move by. |
| void JAM_Particle::setDirection | ( | JAM_Vec2 | direction | ) |
Setter # Sets the direction of the Particle.
| direction | The new direction. |
| void JAM_Particle::setMoveSpeed | ( | float | moveSpeed | ) |
Setter # Sets the moveSpeed of the Particle.
| moveSpeed | The new moveSpeed. |
| void JAM_Particle::setPosition | ( | JAM_Vec2 | position | ) |
Setter # Sets the position of the Particle.
| position | The new position. |
| void JAM_Particle::setPosition | ( | float | x, |
| float | y | ||
| ) |
Setter # Sets the position of the Particle.
| x | The X position. |
| y | The Y position. |
| void JAM_Particle::setScale | ( | float | scaleValue | ) |
Setter # Sets the scale of the Particle.
| scaleValue | The new scale. |
| void JAM_Particle::update | ( | float | dt | ) |
A function that updates the Particle.
| dt | The delta time. |

|
private |
The direction of the Particle.
|
private |
The movement speed of the Particle.
|
private |
The Position of the Particle.
|
private |
The scale of the Particle.
|
private |
A pointer to the Texture.
1.8.8