-
-
Save Longpc/ef5638f81cb810aaa2a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "GameManager.h" | |
using namespace cocos2d; | |
static GameManager *_sharedGameManager = NULL; | |
GameManager* GameManager::getInstance() | |
{ | |
if (! _sharedGameManager) | |
{ | |
_sharedGameManager = new GameManager(); | |
_sharedGameManager->init(); | |
} | |
return _sharedGameManager; | |
} | |
GameManager::~GameManager(void) | |
{ | |
} | |
bool GameManager::init(void) | |
{ | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "cocos2d.h" | |
class GameManager : public cocos2d::Object | |
{ | |
public: | |
/** Returns the shared instance of the Game Manager */ | |
static GameManager* getInstance(void); | |
public: | |
virtual ~GameManager(); | |
bool init(void); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment