7 #include "entityCreator.h"
9 #include "GameStates/GameState.h"
10 #include "GameStates/Running.h"
11 #include "GameStates/Paused.h"
12 #include "GameStates/CreatingPolygon.h"
14 /// ***** Private Variables *****
16 // The stack of active game states
17 vector<GameState*> active_States;
19 // Pointers to each possible game state
20 // inserted and removed from the active_States
23 CreatingPolygon* creating_Polygon;
26 /// ***** Public Methods *****
29 running = new Running();
30 paused = new Paused();
31 creating_Polygon = new CreatingPolygon();
33 // create starting entities
38 cout << "World Created" << endl;
46 delete creating_Polygon;
53 int size = active_States.size();
59 active_States[i]->handleInput(true);
61 active_States[i]->handleInput(false);
66 void gameUpdate(float time_step)
68 int size = active_States.size();
74 active_States[i]->update(time_step, true);
76 active_States[i]->update(time_step, false);
82 int size = active_States.size();
88 active_States[i]->draw(true);
90 active_States[i]->draw(false);