7 #include "entityCreator.h"
8 #include "effectManager.h"
10 #include "GameStates/GameState.h"
11 #include "GameStates/Running.h"
12 #include "GameStates/Paused.h"
13 #include "GameStates/CreatingPolygon.h"
15 /// ***** Private Variables *****
17 // The stack of active game states
18 vector<GameState*> active_States;
20 // Pointers to each possible game state
21 // inserted and removed from the active_States
24 CreatingPolygon* creating_Polygon;
27 /// ***** Public Methods *****
30 running = new Running();
31 paused = new Paused();
32 creating_Polygon = new CreatingPolygon();
34 // create starting entities
37 active_States.push_back(running);
42 cout << "World Created" << endl;
52 delete creating_Polygon;
59 int last = active_States.size() -1;
65 active_States[i]->handleInput(true);
67 active_States[i]->handleInput(false);
71 void gameUpdate(float time_step)
73 int last = active_States.size() -1;
79 active_States[i]->update(time_step, true);
81 active_States[i]->update(time_step, false);
87 int last = active_States.size() -1;
93 active_States[i]->draw(true);
95 active_States[i]->draw(false);