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"
16 /// ***** Private Variables *****
18 // The stack of active game states
19 vector<GameState*> active_States;
21 // Pointers to each possible game state
22 // inserted and removed from the active_States
25 CreatingPolygon* creating_Polygon;
28 /// ***** Public Methods *****
32 running = new Running();
33 paused = new Paused();
34 creating_Polygon = new CreatingPolygon();
36 // create starting entities
39 active_States.push_back(running);
44 cout << "World Created" << endl;
54 delete creating_Polygon;
61 int last = active_States.size() -1;
67 active_States[i]->handleInput(true);
69 active_States[i]->handleInput(false);
73 void game::update(float time_step)
75 int last = active_States.size() -1;
81 active_States[i]->update(time_step, true);
83 active_States[i]->update(time_step, false);
89 int last = active_States.size() -1;
95 active_States[i]->draw(true);
97 active_States[i]->draw(false);