Creates a State object to be inherited.
More...
#include <State.h>
Creates a State object to be inherited.
◆ State()
State::State |
( |
StateManager * |
stateManager, |
|
|
SDL_Window * |
window, |
|
|
int |
screenWidth, |
|
|
int |
screenHeight |
|
) |
| |
Constructs a State object.
- Parameters
-
stateManager | A pointer to the StateManager. |
window | A pointer to the window in use. |
screenWidth | The screen width. |
screenHeight | The screen height. |
◆ ~State()
A virtual destructor for the State object.
◆ draw()
virtual void State::draw |
( |
| ) |
|
|
pure virtual |
A pure virtual function to draw to the screen using the window.
Implemented in MainState.
◆ getWindow()
SDL_Window * State::getWindow |
( |
| ) |
|
Gets the window.
- Returns
- A pointer to the window
◆ input()
virtual bool State::input |
( |
| ) |
|
|
pure virtual |
A pure virtual function to handle the user input for use with the State.
- Returns
- If false then quit State.
Implemented in MainState.
◆ update()
virtual void State::update |
( |
float |
dt | ) |
|
|
pure virtual |
A pure virtual function to update the State to allow the State to run.
- Parameters
-
Implemented in MainState.
◆ screenHeight
The height of the screen.
◆ screenWidth
◆ stateManager
A pointer to the state manager.
◆ window
SDL_Window* State::window |
|
protected |
The window to display to.
The documentation for this class was generated from the following files: