Пример #1
0
PopupLayer* PopupLayer::create(HelloWorld* const & parent)
{
        PopupLayer* pPopupLayer = new PopupLayer(parent);
        pPopupLayer->init();
        pPopupLayer->autorelease();
        return pPopupLayer;
} 
Пример #2
0
PopupLayer* PopupLayer::createGameoverLayer(int gameType, int score) {
    PopupLayer *layer = new PopupLayer();
    if (layer && layer->init()) {
        layer->autorelease();
        layer->initGameoverLayer(gameType, score);
        return layer;
    }
    CC_SAFE_DELETE(layer);
    return NULL;
}
Пример #3
0
PopupLayer* PopupLayer::createSuspendLayer(int gameType) {
    PopupLayer *layer = new PopupLayer();
    if (layer && layer->init()) {
        layer->autorelease();
        layer->initSuspendLayer(gameType);
        return layer;
    }
    CC_SAFE_DELETE(layer);
    return NULL;
}
Пример #4
0
PopupLayer* PopupLayer::create(string pBackgroundImage,
                               string pExitNormalImage,
                               string pExitSelectedImage,
                               const Point &pExitPostion) {
    PopupLayer *pRet = new PopupLayer();
    pRet->init(pBackgroundImage, pExitNormalImage, pExitSelectedImage, pExitPostion);
    pRet->autorelease();
    
    return pRet;
}
Пример #5
0
PopupLayer* PopupLayer::create(Layer * targetLayer,const int type)
{
    PopupLayer* popupLayer = new PopupLayer();
    if (popupLayer && popupLayer->init(targetLayer, type))
    {
        popupLayer->autorelease();
        return popupLayer;
    }
    else
    {
        CC_SAFE_DELETE(popupLayer);
        return nullptr;
    }
}