Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
PS_Particle.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include "../Core/C_Vec2.h"
5 #include "../Core/C_Texture.h"
6 
12 {
13 public:
23 
33  PS_Particle(C_Texture* texture, float scaleValue, C_Vec2 direction, float moveSpeed,
34  C_Vec2 pos, SDL_Colour tintColour);
35 
39  ~PS_Particle();
40 
45  void update(float dt);
46 
51  void draw(SDL_Renderer* renderer);
52 
57  void move(C_Vec2 movement);
58 
63  void setPosition(C_Vec2 pos);
64 
69  void setScale(float scaleValue);
70 
75  void setMoveSpeed(float moveSpeed);
76 
81  void setDirection(C_Vec2 direction);
82 
87  float getMoveSpeed();
88 
94 
100 
105  float getScale();
106 
107 private:
115  float scaleValue;
117  float moveSpeed;
119  bool tint;
121  SDL_Colour tintColour;
122 };
C_Vec2 direction
The direction of the Particle.
Definition: PS_Particle.h:111
float getScale()
Gets the scale of the Particle.
Definition: PS_Particle.cpp:78
void setScale(float scaleValue)
Sets the scale of the Particle.
Definition: PS_Particle.cpp:48
void setDirection(C_Vec2 direction)
Sets the direction of the Particle.
Definition: PS_Particle.cpp:58
float moveSpeed
The movement speed of the Particle.
Definition: PS_Particle.h:117
A Particle object for use with the Particle System.
Definition: PS_Particle.h:11
void setPosition(C_Vec2 pos)
Sets the position of the Particle.
Definition: PS_Particle.cpp:43
SDL_Colour tintColour
The Tint colour of the Particle.
Definition: PS_Particle.h:121
void move(C_Vec2 movement)
Move the Particle.
Definition: PS_Particle.cpp:37
Contains the Vec2 structure with functions and overloaded operators.
Definition: C_Vec2.h:7
C_Vec2 pos
The Position of the Particle.
Definition: PS_Particle.h:113
void draw(SDL_Renderer *renderer)
Draw the Entity to the screen.
Definition: PS_Particle.cpp:24
PS_Particle(C_Texture *texture, float scaleValue, C_Vec2 direction, float moveSpeed, C_Vec2 pos)
Constructs the Particle Object.
Definition: PS_Particle.cpp:3
float getMoveSpeed()
Gets the moveSpeed of the Particle.
Definition: PS_Particle.cpp:63
bool tint
A boolean for if the Particle should be tinted.
Definition: PS_Particle.h:119
C_Vec2 getDirection()
Gets the direction of the Particle.
Definition: PS_Particle.cpp:73
C_Vec2 getPosition()
Gets the position of the Particle.
Definition: PS_Particle.cpp:68
void update(float dt)
A function that updates the Particle.
Definition: PS_Particle.cpp:18
void setMoveSpeed(float moveSpeed)
Sets the moveSpeed of the Particle.
Definition: PS_Particle.cpp:53
C_Texture * texture
A pointer to the Texture.
Definition: PS_Particle.h:109
~PS_Particle()
Destructs the Particle Object deleting the Particle Object from memory.
Definition: PS_Particle.cpp:14
float scaleValue
The scale of the Particle.
Definition: PS_Particle.h:115
Creates a Texture for use with a renderer.
Definition: C_Texture.h:13