Creates a State object. Creates a State object to be inherited. DISCLAIMER - This code is from my PGG SDL Assignment.
More...
#include <state.h>
Creates a State object. Creates a State object to be inherited. DISCLAIMER - This code is from my PGG SDL Assignment.
State::State |
( |
StateManager * |
inStateManager, |
|
|
SDL_Renderer * |
inRenderer, |
|
|
int |
inWidth, |
|
|
int |
inHeight |
|
) |
| |
Constructs a State object
- Parameters
-
StateManager | * a pointer to the StateManager |
SDL_Renderer | * a pointer to the renderer in use. |
int | the screen width |
int | the screen height |
A virtual destructor for the State object
virtual void State::draw |
( |
| ) |
|
|
pure virtual |
A virtual function to draw to the screen A virtual function to draw to the screen using the renderer
Implemented in Game.
virtual bool State::input |
( |
| ) |
|
|
pure virtual |
A virtual function to handle the user input A virtual function to handle the user input for use with the State
- Returns
- bool if false then quit State
Implemented in Game.
virtual void State::update |
( |
float |
deltaTime | ) |
|
|
pure virtual |
A virtual function to update the State A virtual function to update the State to allow the State to run
- Parameters
-
Implemented in Game.
SDL_Renderer* State::renderer |
|
protected |
The documentation for this class was generated from the following files: