-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGameState.h
53 lines (39 loc) · 965 Bytes
/
GameState.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// IGameState.h
// SDL Game Programming Book
//
// Created by shaun mitchell on 09/02/2013.
// Copyright (c) 2013 shaun mitchell. All rights reserved.
//
#ifndef SDL_Game_Programming_Book_IGameState_h
#define SDL_Game_Programming_Book_IGameState_h
#include <string>
#include <vector>
#include <memory>
namespace dani
{
class CompositeEffect;
}
class GameObject;
class GameState
{
public:
virtual ~GameState();
virtual void update();
virtual void render();
virtual bool onEnter();
virtual bool onExit() = 0;
virtual void resume();
void clean();
virtual std::string getStateID() const = 0;
protected:
virtual bool onEnterImpl() = 0;
GameState();
//@todo put everything on pimpl
bool m_loadingComplete;
bool m_exiting;
std::vector<GameObject*> m_gameObjects;
std::vector<std::string> m_textureIDList;
std::unique_ptr<dani::CompositeEffect> m_effects;
};
#endif