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
36 active_States.push_back(running);
39 cout << "World Created" << endl;
47 delete creating_Polygon;
54 int last = active_States.size() -1;
60 active_States[i]->handleInput(true);
62 active_States[i]->handleInput(false);
66 void gameUpdate(float time_step)
68 int last = active_States.size() -1;
74 active_States[i]->update(time_step, true);
76 active_States[i]->update(time_step, false);
82 int last = active_States.size() -1;
88 active_States[i]->draw(true);
90 active_States[i]->draw(false);