Contains the data and functions for the Archer. More...
#include <EE_Archer.h>


Public Member Functions | |
| EE_Archer (C_Texture *sprite, C_Vec2 pos, C_Vec2 dimensions, float *universalSpeed) | |
| Constructs the Archer object. More... | |
| ~EE_Archer () | |
| Destructs the Archer object. More... | |
| void | update (float dt) |
| A function that updates the Archer. More... | |
| void | setDeadStatus (bool dead) |
| Sets the value of dead. More... | |
| bool | getDeadStatus () |
| Returns the value of dead. More... | |
| void | setDeathParticles (bool deathParticles) |
| Sets the value of deathParticles. More... | |
| bool | getDeathParticles () |
| Returns the value of deathParticles. More... | |
| void | setCoinSpawn (bool coinSpawn) |
| Sets the value of the coinSpawn boolean. More... | |
| bool | getCoinSpawn () |
| Gets the value of the coinSpawn boolean. More... | |
| void | setFireArrow (bool fireArrow) |
| Sets the value of the fireArrow boolean. More... | |
| bool | getFireArrow () |
| Gets the value of the fireArrow boolean. More... | |
| void | decreaseHealth (int damage) |
| Decreases the health of the Archer. More... | |
Public Member Functions inherited from EB_VelocityAnimated | |
| EB_VelocityAnimated (C_Texture *sprite, C_Vec2 pos, C_Vec2 dimensions, C_Vec2 velocities, int animationFrames, C_Vec2 spriteDimensions, float animationLength, std::string iD, float *universalSpee) | |
| Constructs the Velocity Animated Entity. More... | |
| ~EB_VelocityAnimated () | |
| Destructs the Velocity Animated Entity object. More... | |
| void | updatePosWithVelocities (float dt) |
| Updates the position of the Entity using the velocities. More... | |
| void | setVelocities (C_Vec2 velocity) |
| Sets the velocities of the Entity. More... | |
| C_Vec2 | getVelocities () |
| Gets the velocities of the Entity. More... | |
Public Member Functions inherited from EB_Animated | |
| EB_Animated (C_Texture *sprite, C_Vec2 pos, C_Vec2 dimensions, int animationFrames, C_Vec2 spriteDimensions, float animationLength, std::string iD, float *universalSpee) | |
| Constructs the Animated Entity. More... | |
| ~EB_Animated () | |
| Destructs the Animated Entity object. More... | |
| void | draw (SDL_Renderer *renderer) |
| Draws the StormCloud to the screen. More... | |
Public Member Functions inherited from EB_Entity | |
| EB_Entity (C_Texture *sprite, C_Vec2 pos, C_Vec2 dimensions, std::string iD, float *universalSpeed) | |
| Constructs the Entity object. More... | |
| ~EB_Entity () | |
| Destructs the Entity object. More... | |
| void | setPosition (C_Vec2 pos) |
| Sets the position of the Entity. More... | |
| void | setX (float x) |
| Sets the x position of the Entity. More... | |
| void | setY (float y) |
| Sets the y position of the Entity. More... | |
| void | setDimensions (C_Vec2 dimensions) |
| Sets the dimensions of the Entity. More... | |
| void | setWidth (float width) |
| Sets the width of the Entity. More... | |
| void | setHeight (float height) |
| Sets the height of the Entity. More... | |
| C_Vec2 | getPosition () |
| Gets the position of the Entity. More... | |
| C_Vec2 | getDimensions () |
| Gets the dimensions of the Entity. More... | |
Private Member Functions | |
| void | animate (float dt) |
| Animates the sprite of the Archer. More... | |
Private Attributes | |
| bool | dead |
| A boolean for if the Archer is dead and to be deleted. More... | |
| bool | coinSpawn |
| A boolean for if the Archer should turn into coins on death. More... | |
| bool | deathParticles |
| A boolean for if the Archer should spawn particles upon death. More... | |
| bool | fireArrow |
| A boolean for if the Archer should fire an arrow. More... | |
| int | health |
| The health of the Archer. More... | |
Additional Inherited Members | |
Protected Attributes inherited from EB_VelocityAnimated | |
| C_Vec2 | velocities |
| The velocities of the Entity. More... | |
Protected Attributes inherited from EB_Animated | |
| int | animationFrames |
| The number of animation frames in the spritesheet. More... | |
| C_Vec2 | spriteDimensions |
| The dimensions of the sprite in the spritesheet. More... | |
| C_Vec2 | spriteIndex |
| The index of the current sprite in the spritesheet. More... | |
| C_Timer | animationTimer |
| The animation timer. More... | |
Protected Attributes inherited from EB_Entity | |
| C_Texture * | sprite |
| A pointer to the Entity Texture. More... | |
| C_Vec2 | pos |
| The position of the Entity. More... | |
| C_Vec2 | dimensions |
| The dimensions of the Entity. More... | |
| std::string | iD |
| The ID of the type of Entity. More... | |
| float * | universalSpeed |
| A pointer for the universal speed of the game. More... | |
Contains the data and functions for the Archer.
Constructs the Archer object.
| sprite | A pointer to the objects Texture. |
| pos | The position of the Archer. |
| dimensions | The dimensions of the Archer. |
| universalSpeed | A pointer for the universal speed of the game. |
| EE_Archer::~EE_Archer | ( | ) |
Destructs the Archer object.
|
privatevirtual |
Animates the sprite of the Archer.
| dt | The delta time. |
Reimplemented from EB_Animated.


| void EE_Archer::decreaseHealth | ( | int | damage | ) |
Decreases the health of the Archer.
damage The amount the health should decrease by.


| bool EE_Archer::getCoinSpawn | ( | ) |
Gets the value of the coinSpawn boolean.
| bool EE_Archer::getDeadStatus | ( | ) |
Returns the value of dead.

| bool EE_Archer::getDeathParticles | ( | ) |
Returns the value of deathParticles.
| bool EE_Archer::getFireArrow | ( | ) |
Gets the value of the fireArrow boolean.
| void EE_Archer::setCoinSpawn | ( | bool | coinSpawn | ) |
Sets the value of the coinSpawn boolean.
| coinSpawn | The new value of coinSpawn. |

| void EE_Archer::setDeadStatus | ( | bool | dead | ) |
Sets the value of dead.
| dead | The new value of dead. |

| void EE_Archer::setDeathParticles | ( | bool | deathParticles | ) |
Sets the value of deathParticles.
| deathParticles | The new value of deathParticles. |

| void EE_Archer::setFireArrow | ( | bool | fireArrow | ) |
Sets the value of the fireArrow boolean.
| coinSpawn | The new value of fireArrow. |
|
virtual |
A function that updates the Archer.
| dt | The delta time. |
Implements EB_VelocityAnimated.

|
private |
A boolean for if the Archer should turn into coins on death.
|
private |
A boolean for if the Archer is dead and to be deleted.
|
private |
A boolean for if the Archer should spawn particles upon death.
|
private |
A boolean for if the Archer should fire an arrow.
|
private |
The health of the Archer.
1.8.8