forked from Arisego/cocotd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameManager.h
70 lines (47 loc) · 1.1 KB
/
GameManager.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef __GAME_MANAGER_H__
#define __GAME_MANAGER_H__
#include "utils/Scriptor.h"
#include "GameScene.h"
#include "utils/FileIO.h"
#include "sublayer/ModelLayer.h"
class GameManager
{
public:
static GameManager *sharedGameManager();
static GameScene *sharedLogicCenter();
static void purgeSharedGameManager();
static void purgeSharedLogicCenter();
static bool mSceneChanged;
void fullPathFromRelativePath(const char *pszRelativePath,string &psz); //提供一个线程安全版本的获取路径函数。
static ModelLayer *mdl;
CCScene* cs;
bool init();
enum SceneId
{
SCENE_MENU,
SCENE_PLAY,
SCENE_GAMEOVER
};
void runSceneWithId(SceneId id);
void settransition();
void runSceneWithTrans(float dt, SceneId id);
SceneId state;
string NextPara;
void preQuit();
void noQuit();
bool m_bInfo;
void showinfo();
void dismissinifo();
void preConfig(int type, int flag, int tab);
void goConfig();
void noConfig();
void prePareSave();
void finisSave();
protected:
GameManager();
~GameManager();
private:
static GameManager *mSharedGameManager;
static GameScene *mCurrentStage;
};
#endif