5 #include "../Core/WindowFrame.h" 33 virtual bool input() = 0;
43 virtual void draw() = 0;
bool destroyed
A boolean for if the state is destroyed.
Definition: State.h:70
Creates a State object to be inherited.
Definition: State.h:13
virtual void update()=0
A pure virtual function to update the State to allow the State to run.
Creates a StateManager object.
Definition: StateManager.h:9
StateManager * stateManager
A pointer to the state manager.
Definition: State.h:64
virtual bool input()=0
A pure virtual function to handle the user input for use with the State.
SDL_Window * window
The window to display to.
Definition: State.h:66
SDL_Window * getWindow()
Gets the window.
Definition: State.cpp:21
void destroyState()
A function to destroy all data in a state.
Definition: State.cpp:33
State(StateManager *stateManager, SDL_Window *window, std::string name)
Constructs a State object.
Definition: State.cpp:6
virtual ~State()
A virtual destructor for the State object.
Definition: State.cpp:17
std::string name
The state name.
Definition: State.h:68
std::string getName()
Gets the name of the state.
Definition: State.cpp:27
virtual void draw()=0
A pure virtual function to draw to the screen using the window.