Creates a State object. Creates a State object to be inherited. More...
#include <State.h>
Public Member Functions | |
JAM_State (JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight) | |
virtual | ~JAM_State () |
virtual bool | input ()=0 |
virtual void | update (float deltaTime)=0 |
virtual void | draw ()=0 |
Protected Attributes | |
JAM_StateManager * | stateManager |
SDL_Renderer * | renderer |
int | screenWidth |
int | screenHeight |
Creates a State object. Creates a State object to be inherited.
JAM_State::JAM_State | ( | JAM_StateManager * | stateManager, |
SDL_Renderer * | renderer, | ||
int | screenWidth, | ||
int | screenHeight | ||
) |
Constructs the State object.
stateManager | A pointer to the StateManager. |
renderer | A pointer to the renderer in use. |
screenWidth | The screen width. |
screenHeight | The screen height. |
|
virtual |
A virtual destructor for the State object.
|
pure virtual |
A pure virtual function to draw to the screen using the renderer.
Implemented in Game.
|
pure virtual |
A pure virtual function to handle the user input for use with the State.
Implemented in Game.
|
pure virtual |
A pure virtual function to update the State to allow the State to run.
dt | The delta time. |
Implemented in Game.
|
protected |
The render to display to.
|
protected |
The height of the screen.
|
protected |
The width of the screen.
|
protected |
A pointer to the state manager.