Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Protected Attributes | List of all members
S_State Class Referenceabstract

Contains State functions and data to be inherited by all other states. More...

#include <S_State.h>

Inheritance diagram for S_State:
Inheritance graph
Collaboration diagram for S_State:
Collaboration graph

Public Member Functions

 S_State (S_StateManager *stateManager, SDL_Renderer *renderer, C_Vec2 dimensions)
 Constructs the State object. More...
 
virtual ~S_State ()
 A virtual destructor for the State object. More...
 
virtual bool input ()=0
 A pure virtual function to handle the user input for use with the State. More...
 
virtual void update (float deltaTime)=0
 A pure virtual function to update the State to allow the State to run. More...
 
virtual void draw ()=0
 A pure virtual function to draw to the screen using the renderer. More...
 

Protected Attributes

S_StateManagerstateManager
 A pointer to the state manager. More...
 
SDL_Renderer * renderer
 A pointer to the renderer. More...
 
C_Vec2 dimensions
 The screen dimensions. More...
 

Detailed Description

Contains State functions and data to be inherited by all other states.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

S_State::S_State ( S_StateManager stateManager,
SDL_Renderer *  renderer,
C_Vec2  dimensions 
)

Constructs the State object.

Parameters
stateManagerA pointer to the StateManager.
rendererA pointer to the renderer.
dimensionsThe screen dimensions.
S_State::~S_State ( )
virtual

A virtual destructor for the State object.

Member Function Documentation

virtual void S_State::draw ( )
pure virtual

A pure virtual function to draw to the screen using the renderer.

Implemented in S_Game, SM_EndGame, SM_MainMenu, SM_Scores, SM_Credits, SM_Help, and S_Splash.

virtual bool S_State::input ( )
pure virtual

A pure virtual function to handle the user input for use with the State.

Returns
If false then quit State.

Implemented in S_Game, SM_EndGame, SM_MainMenu, SM_Scores, SM_Credits, SM_Help, and S_Splash.

virtual void S_State::update ( float  deltaTime)
pure virtual

A pure virtual function to update the State to allow the State to run.

Parameters
dtThe delta time.

Implemented in S_Game, SM_EndGame, SM_MainMenu, SM_Scores, SM_Credits, SM_Help, and S_Splash.

Member Data Documentation

C_Vec2 S_State::dimensions
protected

The screen dimensions.

SDL_Renderer* S_State::renderer
protected

A pointer to the renderer.

S_StateManager* S_State::stateManager
protected

A pointer to the state manager.


The documentation for this class was generated from the following files: