//インスタンス生成
GameLayer* GameLayer::create(int level)
{
    GameLayer *pRet = new GameLayer();
    pRet->init(level);
    pRet->autorelease();
    
    return pRet;
}
Пример #2
0
CCScene* GameLayer::scene()
{
    CCScene* scene = CCScene::create();
    GameLayer* gameLayer = new GameLayer();
    gameLayer->autorelease();
    scene->addChild(gameLayer);
    return scene;
}
Пример #3
0
GameLayer * GameLayer::create() {
	GameLayer * layer = new GameLayer();
    
	if (layer) {
		layer->autorelease();
		layer->initGame();
        return layer;
	}
	CC_SAFE_DELETE(layer);
	return NULL;
}
Пример #4
0
GameScene* GameScene::create(const int gameType)
{
    GameScene* result = new GameScene();
    if (result->init())
    {
        GameLayer* layer = new GameLayer(gameType);
        layer->autorelease();
        result->addChild(layer);
        return result;
    }
    delete result;
    return NULL;
}
Пример #5
0
GameLayer* GameLayer::create(GameMode gameMode) {
    GameLayer *pRet = new GameLayer(gameMode);
    if (pRet && pRet->init())
    {
        pRet->autorelease();
        return pRet;
    }
    else
    {
        delete pRet;
        pRet = NULL;
        return NULL;
    }
}
Пример #6
0
GameLayer*  GameLayer::create(int gamemode) 
{ 
    GameLayer *pRet = new(std::nothrow) GameLayer(); 
    if (pRet) 
    { 
		pRet->gamemode=gamemode;
		if(pRet->init()){
        pRet->autorelease(); 
		return pRet; }else{delete pRet; 
        pRet = NULL; 
        return NULL; }
    } 
    else 
    { 
        delete pRet; 
        pRet = NULL; 
        return NULL; 
    } 
}
Пример #7
0
GameLayer* GameLayer::create() {
    GameLayer* mGameLayer = new GameLayer();
    mGameLayer->autorelease();
    return mGameLayer;
}