Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Particle.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include "Vec2.h"
5 #include "Texture.h"
6 
13 {
14 private:
22  float scaleValue;
24  float moveSpeed;
25 
26 public:
35  JAM_Particle(JAM_Texture* texture, float scaleValue, JAM_Vec2 direction, float moveSpeed, JAM_Vec2 position);
36 
40  ~JAM_Particle();
41 
46  void update(float dt);
47 
52  void draw(SDL_Renderer* renderer);
53 
58  void setPosition(JAM_Vec2 position);
59 
65  void setPosition(float x, float y);
66 
71  void setScale(float scaleValue);
72 
77  void move(JAM_Vec2 movement);
78 
83  void moveX(float movement);
84 
89  void moveY(float movement);
90 
95  void setMoveSpeed(float moveSpeed);
96 
101  void setDirection(JAM_Vec2 direction);
102 
107  float getMoveSpeed();
108 
114 
120 
125  float getScale();
126 };
void setPosition(JAM_Vec2 position)
Definition: Particle.cpp:44
float scaleValue
Definition: Particle.h:22
void moveX(float movement)
Definition: Particle.cpp:82
Creates a Particle object.
Definition: Particle.h:12
void setDirection(JAM_Vec2 direction)
Definition: Particle.cpp:109
JAM_Texture * texture
Definition: Particle.h:16
void moveY(float movement)
Definition: Particle.cpp:91
Creates a Texture for use with a renderer. Creates a Texture from an image file, this can then be use...
Definition: Texture.h:13
JAM_Particle(JAM_Texture *texture, float scaleValue, JAM_Vec2 direction, float moveSpeed, JAM_Vec2 position)
Definition: Particle.cpp:6
void draw(SDL_Renderer *renderer)
Definition: Particle.cpp:35
JAM_Vec2 position
Definition: Particle.h:20
float getScale()
Definition: Particle.cpp:145
JAM_Vec2 getDirection()
Definition: Particle.cpp:136
JAM_Vec2 direction
Definition: Particle.h:18
void setScale(float scaleValue)
Definition: Particle.cpp:64
void update(float dt)
Definition: Particle.cpp:26
void setMoveSpeed(float moveSpeed)
Definition: Particle.cpp:100
void move(JAM_Vec2 movement)
Definition: Particle.cpp:73
~JAM_Particle()
Definition: Particle.cpp:19
JAM_Vec2 getPosition()
Definition: Particle.cpp:127
float getMoveSpeed()
Definition: Particle.cpp:118
float moveSpeed
Definition: Particle.h:24
Creates an Vec2 structure with functions. Creates an Vec2 structure with overloaded operators to crea...
Definition: Vec2.h:9