Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
G_SpawnManager Class Reference

A class that manages the spawning of the entities in the game. More...

#include <G_SpawnManager.h>

Collaboration diagram for G_SpawnManager:
Collaboration graph

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_Playerplayer
 A pointer to the Player. More...
 
E_EntityManagerentityManager
 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...
 

Detailed Description

A class that manages the spawning of the entities in the game.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

G_SpawnManager::G_SpawnManager ( C_Vec2  screenDimensions,
EP_Player player,
E_EntityManager entityManager,
float *  universalSpeed 
)

Constructs the SpawnManager.

Parameters
screenDimensionsThe screen dimensions.
playerA pointer to the Player.
entityManagerA pointer to the EntityManager.
universalSpeedA pointer for the universal speed of the game.
G_SpawnManager::~G_SpawnManager ( )

Destructs the SpawnManager.

Member Function Documentation

std::string G_SpawnManager::getEntityID ( int  entityType)
private

A function to get the ID of the entity type.

Parameters
entityTypeThe type of the new Entity to spawn.
TheID of the entity type.

Here is the caller graph for this function:

int G_SpawnManager::pickEntity ( )
private

A function to pick a new Entity type.

Returns
The type of the new Entity to spawn.

Here is the call graph for this function:

Here is the caller graph for this function:

void G_SpawnManager::spawnEntity ( float  spawnY,
int  entityToSpawn 
)
private

A function to spawn a new Entity.

Parameters
spawnYThe generated y position for the Entity to spawn at.
entityToSpawnThe type of the new Entity to spawn.

Here is the call graph for this function:

Here is the caller graph for this function:

void G_SpawnManager::spawnEntityWave ( )
private

A function to spawn a new wave of Entities.

Here is the call graph for this function:

Here is the caller graph for this function:

void G_SpawnManager::update ( float  dt)

A function to update the SpawnManager.

Parameters
dtThe delta time.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

E_EntityManager* G_SpawnManager::entityManager
private

A pointer to the EntityManager.

EP_Player* G_SpawnManager::player
private

A pointer to the Player.

C_Vec2 G_SpawnManager::screenDimensions
private

The screen dimensions.

C_Timer G_SpawnManager::spawnTimer
private

A timer for the entity spawner.

float* G_SpawnManager::universalSpeed
private

A pointer for the universal speed of the game.

float G_SpawnManager::waveTime
private

The current spawn speed for the wave.

C_Timer G_SpawnManager::waveTimer
private

A timer for the wave number.


The documentation for this class was generated from the following files: