4 #include "../Base/EB_Animated.h"
6 #include "../../Core/C_Vec2.h"
7 #include "../../Core/C_Timer.h"
8 #include "../../Core/C_Utilities.h"
9 #include "../../Core/C_Audio.h"
10 #include "../../ParticleSystem/PS_ParticleEffect.h"
53 void input(SDL_Event& incomingEvent,
C_Vec2 mousePos);
59 void draw(SDL_Renderer* renderer);
int maxCoins
Definition: EP_Player.h:164
Handles audio using SDL_Mixer.
Definition: C_Audio.h:12
C_Vec2 archerOffset
An offset for the position of the player archer from the position the player.
Definition: EP_Player.h:168
int getHealth()
Returns the health of the Player.
Definition: EP_Player.cpp:204
C_Timer flamingPowerUpTimer
The flamingPowerUp timer.
Definition: EP_Player.h:172
~EP_Player()
Destructs the Player object.
Definition: EP_Player.cpp:24
void setFlaming(bool flamingPowerUp)
Sets the value of the flamingPowerUp boolean.
Definition: EP_Player.cpp:254
int health
The health of the player.
Definition: EP_Player.h:157
Handles Particle objects and Particle Effect functions.
Definition: PS_ParticleEffect.h:19
C_Vec2 offset
An offset for the position of the player from the position the player was pressed.
Definition: EP_Player.h:153
void draw(SDL_Renderer *renderer)
A function that draws the Player to the screen.
Definition: EP_Player.cpp:163
bool timeSlowPowerUp
A boolean for if the player has the time slow power up active.
Definition: EP_Player.h:184
C_Timer timeSlowPowerUpTimer
The timeSlowPowerUp timer.
Definition: EP_Player.h:186
C_Vec2 dimensions
The dimensions of the Entity.
Definition: EB_Entity.h:94
bool getFireArrow()
Gets the value of the archer fireArrow boolean.
Definition: EP_Player.cpp:239
void decreaseHealth()
A function that decreases the Player health by 1.
Definition: EP_Player.cpp:184
void setFireArrow(bool fireArrow)
Sets the value of the archer fireArrow boolean.
Definition: EP_Player.cpp:234
bool pressed
The user commands for the Player.
Definition: EP_Player.h:151
Contains the Vec2 structure with functions and overloaded operators.
Definition: C_Vec2.h:7
Contains the data and functions for the Player Archer.
Definition: EP_PlayerArcher.h:12
EP_PlayerArcher * archer
The Player Archer.
Definition: EP_Player.h:166
C_Audio * healthLossSounds[3]
The array of hit audio.
Definition: EP_Player.h:180
C_Vec2 fireEffectOffset
An offset for the position of the fire effect from the position the player.
Definition: EP_Player.h:176
PS_ParticleEffect * fireEffect
The fire particle effect.
Definition: EP_Player.h:174
bool flamingPowerUp
A boolean for if the player has the flaming power up active.
Definition: EP_Player.h:170
void increaseCoins()
A function that increases the Player coins by 1.
Definition: EP_Player.cpp:209
bool getFlaming()
Gets the value of the flamingPowerUp boolean.
Definition: EP_Player.cpp:259
Contains the data and functions for the player.
Definition: EP_Player.h:16
void update(float dt)
A function that updates the Player.
Definition: EP_Player.cpp:36
C_Vec2 pos
The position of the Entity.
Definition: EB_Entity.h:92
EP_Player(C_Texture *sprite, C_Vec2 pos, C_Vec2 dimensions, C_Texture *archerSprite, C_Vec2 archerPos, C_Vec2 archerDimensions, C_Vec2 screenDimensions, C_Texture *fireSprite, SDL_Colour minTint, SDL_Colour maxTint, float *universalSpeed)
Constructs the Player object.
Definition: EP_Player.cpp:3
int maxHealth
The max health of the player.
Definition: EP_Player.h:159
C_Texture * sprite
A pointer to the Entity Texture.
Definition: EB_Entity.h:90
void setFiring(bool firing)
Sets the value of the archer firing boolean.
Definition: EP_Player.cpp:244
bool shield
A bool for if the Player shield is active.
Definition: EP_Player.h:178
Handles timer functions.
Definition: C_Timer.h:7
int coins
The current number of coins of the player.
Definition: EP_Player.h:161
void activateShield()
Activates the Player shield.
Definition: EP_Player.cpp:274
int getCoins()
Returns the number coins of the Player.
Definition: EP_Player.cpp:214
bool entityCollisionTest(C_Vec2 entityPos, C_Vec2 entityDimensions)
A function to test if the player has collided with an Entity.
Definition: EP_Player.cpp:219
bool getFiring()
Gets the value of the archer firing boolean.
Definition: EP_Player.cpp:249
C_Audio * shieldLossSound
The shield loss audio.
Definition: EP_Player.h:182
void setTimeSlow(bool timeSlowPowerUp)
Sets the value of the timeSlowPowerUp boolean.
Definition: EP_Player.cpp:264
An Entity that uses a spritesheet for animation.
Definition: EB_Animated.h:11
void increaseHealth()
A function that increases the Player health by 1.
Definition: EP_Player.cpp:175
C_Vec2 screenDimensions
The screen Dimensions.
Definition: EP_Player.h:155
float * universalSpeed
A pointer for the universal speed of the game.
Definition: EB_Entity.h:98
Creates a Texture for use with a renderer.
Definition: C_Texture.h:13
void input(SDL_Event &incomingEvent, C_Vec2 mousePos)
A function that handles the Player input.
Definition: EP_Player.cpp:108
bool getTimeSlow()
Gets the value of the timeSlowPowerUp boolean.
Definition: EP_Player.cpp:269