Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
S_StateManager.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include <SDL.h>
5 #include "S_State.h"
6 
12 {
13 public:
18 
23 
28  void addState(S_State* state);
29 
34  void changeState(S_State* state);
35 
39  void removeLastState();
40 
45  bool input();
46 
51  void update(float dt);
52 
56  void draw();
57 
58 private:
60  std::vector<S_State*> currentStates;
61 };
bool input()
Handles the user input for the current State on the top of the stack.
Definition: S_StateManager.cpp:44
void draw()
Draws the current States.
Definition: S_StateManager.cpp:54
Contains State functions and data to be inherited by all other states.
Definition: S_State.h:14
void removeLastState()
Removes the last State from the vector.
Definition: S_StateManager.cpp:36
void addState(S_State *state)
Adds a new state to the current stack of states.
Definition: S_StateManager.cpp:16
~S_StateManager()
Destructs the StateManager object.
Definition: S_StateManager.cpp:7
void changeState(S_State *state)
Changes the current State to a new State.
Definition: S_StateManager.cpp:22
Handles the functions for all State objects.
Definition: S_StateManager.h:11
void update(float dt)
Updates the current State on the top of the stack.
Definition: S_StateManager.cpp:49
S_StateManager()
Constructs the StateManager object.
Definition: S_StateManager.cpp:3
std::vector< S_State * > currentStates
The current states that are in use.
Definition: S_StateManager.h:60