36 virtual bool input() = 0;
42 virtual void update(
float dt) = 0;
47 virtual void draw() = 0;
Creates a State object to be inherited.
Definition: State.h:15
State(StateManager *stateManager, SDL_Window *window, int screenWidth, int screenHeight)
Constructs a State object.
Definition: State.cpp:5
Creates a StateManager object.
Definition: StateManager.h:13
StateManager * stateManager
A pointer to the state manager.
Definition: State.h:57
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:59
SDL_Window * getWindow()
Gets the window.
Definition: State.cpp:21
virtual ~State()
A virtual destructor for the State object.
Definition: State.cpp:17
int screenHeight
The height of the screen.
Definition: State.h:63
int screenWidth
The width of the screen.
Definition: State.h:61
virtual void draw()=0
A pure virtual function to draw to the screen using the window.
virtual void update(float dt)=0
A pure virtual function to update the State to allow the State to run.