Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
State.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <string.h>
5 
7 class JAM_StateManager;
8 
15 class JAM_State
16 {
17 protected:
21  SDL_Renderer* renderer;
26 
27 public:
35  JAM_State(JAM_StateManager* stateManager, SDL_Renderer* renderer, int screenWidth, int screenHeight);
36 
40  virtual ~JAM_State();
41 
46  virtual bool input() = 0;
47 
52  virtual void update(float deltaTime) = 0;
53 
57  virtual void draw() = 0;
58 };
Creates a State object. Creates a State object to be inherited.
Definition: State.h:15
SDL_Renderer * renderer
Definition: State.h:21
Creates a StateManager object. Creates a StateManager object to be inherited.
Definition: StateManager.h:13
virtual ~JAM_State()
Definition: State.cpp:21
virtual bool input()=0
virtual void update(float deltaTime)=0
int screenWidth
Definition: State.h:23
JAM_StateManager * stateManager
Definition: State.h:19
int screenHeight
Definition: State.h:25
virtual void draw()=0
JAM_State(JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight)
Definition: State.cpp:6