Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
StateManager.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include <SDL.h>
5 #include "State.h"
6 
14 {
15 private:
17  std::vector<JAM_State*> currentStates;
18 
19 public:
24 
29 
34  void addState(JAM_State* state);
35 
40  void changeState(JAM_State* state);
41 
45  void removeLastState();
46 
52  bool input();
53 
59  void update(float dt);
60 
65  void draw();
66 };
Creates a State object. Creates a State object to be inherited.
Definition: State.h:15
bool input()
Definition: StateManager.cpp:61
Creates a StateManager object. Creates a StateManager object to be inherited.
Definition: StateManager.h:13
void removeLastState()
Definition: StateManager.cpp:50
void draw()
Definition: StateManager.cpp:78
void changeState(JAM_State *state)
Definition: StateManager.cpp:33
std::vector< JAM_State * > currentStates
Definition: StateManager.h:17
~JAM_StateManager()
Definition: StateManager.cpp:13
void addState(JAM_State *state)
Definition: StateManager.cpp:25
void update(float dt)
Definition: StateManager.cpp:69
JAM_StateManager()
Definition: StateManager.cpp:6