Commit dc9f0c3f authored by Konrad McClure's avatar Konrad McClure
Browse files

Added CGameEngine class to run the game from

parent c9e779ed
#ifndef GAMEENGINE_H
#define GAMEENGINE_H
#include "..\gamestate.h"
#include <vector>
class CGameEngine
{
public:
// Initializaiton and Closing Functions
void Init();
void Cleanup();
// Operations with the gamestate stack
void ChangeState(CGameState* state);
void PushState(CGameState* state);
void PopState();
// Primary Loop
void HandleEvents();
void Update();
void Draw();
// Inline Checks
bool isRunning() { return m_running; }
void Quit() { m_running = false; }
private:
// Gamestate Stack
vector<CGameState*> states;
// Currently running bool (false will initiate cleanup)
bool m_running;
}
#endif
\ No newline at end of file
#include "gamestate.h"
class CIntroState : public CGameState
{
public:
void Init();
void Cleanup();
void Pause();
void Resume();
void HandleEvents();
void Update();
private:
};
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment