Jamie Slowgrove - PGG Assignment 2
 All Classes Namespaces Files Functions Variables Typedefs Macros
State.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <iostream>
5 #include <string.h>
6 
8 class StateManager;
9 
16 class State
17 {
18 protected:
22  SDL_Window* window;
27 
28 public:
36  State(StateManager* stateManager, SDL_Window* window, int screenWidth, int screenHeight);
37 
41  virtual ~State();
42 
47  virtual bool input() = 0;
48 
53  virtual void update(float dt) = 0;
54 
58  virtual void draw() = 0;
59 
64  SDL_Window* getWindow();
65 };
Creates a State object. Creates a State object to be inherited. DISCLAMER - This is a modified versio...
Definition: State.h:16
State(StateManager *stateManager, SDL_Window *window, int screenWidth, int screenHeight)
Definition: State.cpp:6
Creates a StateManager object. Creates a StateManager object to be inherited. DISCLAMER - This is my ...
Definition: StateManager.h:13
StateManager * stateManager
Definition: State.h:20
virtual bool input()=0
SDL_Window * window
Definition: State.h:22
SDL_Window * getWindow()
Definition: State.cpp:29
virtual ~State()
Definition: State.cpp:21
int screenHeight
Definition: State.h:26
int screenWidth
Definition: State.h:24
virtual void draw()=0
virtual void update(float dt)=0