//インスタンス生成
GameLayer* GameLayer::create(int level)
{
    GameLayer *pRet = new GameLayer();
    pRet->init(level);
    pRet->autorelease();
    
    return pRet;
}
Example #2
0
CCScene *GameLayer::scenee()
{
    CCScene *scene = CCScene::create();
    GameLayer *layer = new GameLayer();
    layer->init();
    scene->addChild(layer);
    return scene;
    
}
Example #3
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;
    }
}
Example #4
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; 
    } 
}