Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
S_State.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <string.h>
5 #include "../Core/C_Vec2.h"
6 
8 class S_StateManager;
9 
14 class S_State
15 {
16 public:
24 
28  virtual ~S_State();
29 
34  virtual bool input() = 0;
35 
40  virtual void update(float deltaTime) = 0;
41 
45  virtual void draw() = 0;
46 
47 protected:
51  SDL_Renderer* renderer;
54 };
C_Vec2 dimensions
The screen dimensions.
Definition: S_State.h:53
Contains State functions and data to be inherited by all other states.
Definition: S_State.h:14
Contains the Vec2 structure with functions and overloaded operators.
Definition: C_Vec2.h:7
virtual void draw()=0
A pure virtual function to draw to the screen using the renderer.
S_StateManager * stateManager
A pointer to the state manager.
Definition: S_State.h:49
virtual void update(float deltaTime)=0
A pure virtual function to update the State to allow the State to run.
Handles the functions for all State objects.
Definition: S_StateManager.h:11
virtual ~S_State()
A virtual destructor for the State object.
Definition: S_State.cpp:8
S_State(S_StateManager *stateManager, SDL_Renderer *renderer, C_Vec2 dimensions)
Constructs the State object.
Definition: S_State.cpp:3
SDL_Renderer * renderer
A pointer to the renderer.
Definition: S_State.h:51
virtual bool input()=0
A pure virtual function to handle the user input for use with the State.