|
Level H Engine
|
Creates a State object to be inherited. More...
#include <State.h>


Public Member Functions | |
| State (StateManager *stateManager, SDL_Window *window, std::string name) | |
| Constructs a State object. More... | |
| virtual | ~State () |
| A virtual destructor for the State object. More... | |
| virtual bool | input ()=0 |
| A pure virtual function to handle the user input for use with the State. More... | |
| virtual void | update ()=0 |
| A pure virtual function to update the State to allow the State to run. More... | |
| virtual void | draw ()=0 |
| A pure virtual function to draw to the screen using the window. More... | |
| SDL_Window * | getWindow () |
| Gets the window. More... | |
| std::string | getName () |
| Gets the name of the state. More... | |
| void | destroyState () |
| A function to destroy all data in a state. More... | |
Protected Attributes | |
| StateManager * | stateManager |
| A pointer to the state manager. More... | |
| SDL_Window * | window |
| The window to display to. More... | |
| std::string | name |
| The state name. More... | |
| bool | destroyed |
| A boolean for if the state is destroyed. More... | |
Creates a State object to be inherited.
| State::State | ( | StateManager * | stateManager, |
| SDL_Window * | window, | ||
| std::string | name | ||
| ) |
Constructs a State object.
| stateManager | A pointer to the StateManager. |
| window | A pointer to the window in use. |
| name | The name of the state. |
|
virtual |
A virtual destructor for the State object.
| void State::destroyState | ( | ) |
A function to destroy all data in a state.


|
pure virtual |
A pure virtual function to draw to the screen using the window.
Implemented in CannonGame, Assignment1Demo, Splash, WinLose, Help, FlockingDemo, HeightmapDemo, and MainMenu.
| std::string State::getName | ( | ) |
Gets the name of the state.

| SDL_Window * State::getWindow | ( | ) |
Gets the window.
|
pure virtual |
A pure virtual function to handle the user input for use with the State.
Implemented in CannonGame, Assignment1Demo, Splash, WinLose, Help, FlockingDemo, HeightmapDemo, and MainMenu.
|
pure virtual |
A pure virtual function to update the State to allow the State to run.
Implemented in CannonGame, Assignment1Demo, Splash, WinLose, Help, FlockingDemo, HeightmapDemo, and MainMenu.
|
protected |
A boolean for if the state is destroyed.
|
protected |
The state name.
|
protected |
A pointer to the state manager.
|
protected |
The window to display to.
1.8.13