Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Private Attributes | List of all members
PS_Particle Class Reference

A Particle object for use with the Particle System. More...

#include <PS_Particle.h>

Collaboration diagram for PS_Particle:
Collaboration graph

Public Member Functions

 PS_Particle (C_Texture *texture, float scaleValue, C_Vec2 direction, float moveSpeed, C_Vec2 pos)
 Constructs the Particle Object. More...
 
 PS_Particle (C_Texture *texture, float scaleValue, C_Vec2 direction, float moveSpeed, C_Vec2 pos, SDL_Colour tintColour)
 Constructs the Particle Object. More...
 
 ~PS_Particle ()
 Destructs the Particle Object deleting the Particle Object from memory. More...
 
void update (float dt)
 A function that updates the Particle. More...
 
void draw (SDL_Renderer *renderer)
 Draw the Entity to the screen. More...
 
void move (C_Vec2 movement)
 Move the Particle. More...
 
void setPosition (C_Vec2 pos)
 Sets the position of the Particle. More...
 
void setScale (float scaleValue)
 Sets the scale of the Particle. More...
 
void setMoveSpeed (float moveSpeed)
 Sets the moveSpeed of the Particle. More...
 
void setDirection (C_Vec2 direction)
 Sets the direction of the Particle. More...
 
float getMoveSpeed ()
 Gets the moveSpeed of the Particle. More...
 
C_Vec2 getPosition ()
 Gets the position of the Particle. More...
 
C_Vec2 getDirection ()
 Gets the direction of the Particle. More...
 
float getScale ()
 Gets the scale of the Particle. More...
 

Private Attributes

C_Texturetexture
 A pointer to the Texture. More...
 
C_Vec2 direction
 The direction of the Particle. More...
 
C_Vec2 pos
 The Position of the Particle. More...
 
float scaleValue
 The scale of the Particle. More...
 
float moveSpeed
 The movement speed of the Particle. More...
 
bool tint
 A boolean for if the Particle should be tinted. More...
 
SDL_Colour tintColour
 The Tint colour of the Particle. More...
 

Detailed Description

A Particle object for use with the Particle System.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

PS_Particle::PS_Particle ( C_Texture texture,
float  scaleValue,
C_Vec2  direction,
float  moveSpeed,
C_Vec2  pos 
)

Constructs the Particle Object.

Parameters
squareA pointer to the Texture.
scaleValueThe scale of the Particle.
directionThe direction of the Particle.
moveSpeedThe move speed of the Particle.
posThe position of the Particle.
PS_Particle::PS_Particle ( C_Texture texture,
float  scaleValue,
C_Vec2  direction,
float  moveSpeed,
C_Vec2  pos,
SDL_Colour  tintColour 
)

Constructs the Particle Object.

Parameters
squareA pointer to the Texture.
scaleValueThe scale of the Particle.
directionThe direction of the Particle.
moveSpeedThe move speed of the Particle.
posThe position of the Particle.
tintColourThe tint colour of the Particle.
PS_Particle::~PS_Particle ( )

Destructs the Particle Object deleting the Particle Object from memory.

Member Function Documentation

void PS_Particle::draw ( SDL_Renderer *  renderer)

Draw the Entity to the screen.

Parameters
rendererA pointer to the renderer.

Here is the call graph for this function:

C_Vec2 PS_Particle::getDirection ( )

Gets the direction of the Particle.

Returns
The direction of the Particle.
float PS_Particle::getMoveSpeed ( )

Gets the moveSpeed of the Particle.

Returns
The moveSpeed.
C_Vec2 PS_Particle::getPosition ( )

Gets the position of the Particle.

Returns
The position of the Particle.
float PS_Particle::getScale ( )

Gets the scale of the Particle.

Returns
The scale of the Particle.
void PS_Particle::move ( C_Vec2  movement)

Move the Particle.

Parameters
movementThe amount to move by.

Here is the caller graph for this function:

void PS_Particle::setDirection ( C_Vec2  direction)

Sets the direction of the Particle.

Parameters
directionThe new direction.
void PS_Particle::setMoveSpeed ( float  moveSpeed)

Sets the moveSpeed of the Particle.

Parameters
moveSpeedThe new moveSpeed.
void PS_Particle::setPosition ( C_Vec2  pos)

Sets the position of the Particle.

Parameters
posThe new position.
void PS_Particle::setScale ( float  scaleValue)

Sets the scale of the Particle.

Parameters
scaleValueThe new scale.
void PS_Particle::update ( float  dt)

A function that updates the Particle.

Parameters
dtThe delta time.

Here is the call graph for this function:

Member Data Documentation

C_Vec2 PS_Particle::direction
private

The direction of the Particle.

float PS_Particle::moveSpeed
private

The movement speed of the Particle.

C_Vec2 PS_Particle::pos
private

The Position of the Particle.

float PS_Particle::scaleValue
private

The scale of the Particle.

C_Texture* PS_Particle::texture
private

A pointer to the Texture.

bool PS_Particle::tint
private

A boolean for if the Particle should be tinted.

SDL_Colour PS_Particle::tintColour
private

The Tint colour of the Particle.


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