A class that manages the spawning of the entities in the game. More...
#include <G_SpawnManager.h>

Public Member Functions | |
| G_SpawnManager (C_Vec2 screenDimensions, EP_Player *player, E_EntityManager *entityManager, float *universalSpeed) | |
| Constructs the SpawnManager. More... | |
| ~G_SpawnManager () | |
| Destructs the SpawnManager. More... | |
| void | update (float dt) |
| A function to update the SpawnManager. More... | |
Private Member Functions | |
| void | spawnEntityWave () |
| A function to spawn a new wave of Entities. More... | |
| int | pickEntity () |
| A function to pick a new Entity type. More... | |
| std::string | getEntityID (int entityType) |
| A function to get the ID of the entity type. More... | |
| void | spawnEntity (float spawnY, int entityToSpawn) |
| A function to spawn a new Entity. More... | |
Private Attributes | |
| C_Vec2 | screenDimensions |
| The screen dimensions. More... | |
| EP_Player * | player |
| A pointer to the Player. More... | |
| E_EntityManager * | entityManager |
| A pointer to the EntityManager. More... | |
| C_Timer | spawnTimer |
| A timer for the entity spawner. More... | |
| C_Timer | waveTimer |
| A timer for the wave number. More... | |
| float | waveTime |
| The current spawn speed for the wave. More... | |
| float * | universalSpeed |
| A pointer for the universal speed of the game. More... | |
A class that manages the spawning of the entities in the game.
| G_SpawnManager::G_SpawnManager | ( | C_Vec2 | screenDimensions, |
| EP_Player * | player, | ||
| E_EntityManager * | entityManager, | ||
| float * | universalSpeed | ||
| ) |
Constructs the SpawnManager.
| screenDimensions | The screen dimensions. |
| player | A pointer to the Player. |
| entityManager | A pointer to the EntityManager. |
| universalSpeed | A pointer for the universal speed of the game. |
| G_SpawnManager::~G_SpawnManager | ( | ) |
Destructs the SpawnManager.
|
private |
A function to get the ID of the entity type.
| entityType | The type of the new Entity to spawn. |
| The | ID of the entity type. |

|
private |
A function to pick a new Entity type.


|
private |
A function to spawn a new Entity.
| spawnY | The generated y position for the Entity to spawn at. |
| entityToSpawn | The type of the new Entity to spawn. |


|
private |
A function to spawn a new wave of Entities.


| void G_SpawnManager::update | ( | float | dt | ) |
A function to update the SpawnManager.
| dt | The delta time. |


|
private |
A pointer to the EntityManager.
|
private |
A pointer to the Player.
|
private |
The screen dimensions.
|
private |
A timer for the entity spawner.
|
private |
A pointer for the universal speed of the game.
|
private |
The current spawn speed for the wave.
|
private |
A timer for the wave number.
1.8.8