コード例 #1
0
ファイル: CCActionTiledGrid.cpp プロジェクト: IppClub/Dorothy
CCTurnOffTiles* CCTurnOffTiles::create(float duration, const CCSize& gridSize)
{
    CCTurnOffTiles* pAction = new CCTurnOffTiles();
    if (pAction->initWithDuration(duration, gridSize, 0))
    {
        pAction->autorelease();
    }
    else
    {
        CC_SAFE_RELEASE_NULL(pAction);
    }
    return pAction;
}
コード例 #2
0
CCTurnOffTiles* CCTurnOffTiles::create(float duration, const CCSize& gridSize, unsigned int seed)
{
    CCTurnOffTiles *pAction = new CCTurnOffTiles();

    if (pAction)
    {
        if (pAction->initWithDuration(duration, gridSize, seed))
        {
            CC_SAFE_AUTORELEASE(pAction);
        }
        else
        {
            CC_SAFE_RELEASE_NULL(pAction);
        }
    }

    return pAction;
}
コード例 #3
0
ファイル: CCActionTiledGrid.cpp プロジェクト: IppClub/Dorothy
CCObject* CCTurnOffTiles::copyWithZone(CCZone *pZone)
{
    CCZone* pNewZone = NULL;
    CCTurnOffTiles* pCopy = NULL;
    if(pZone && pZone->m_pCopyObject) 
    {
        pCopy = (CCTurnOffTiles*)(pZone->m_pCopyObject);
    }
    else
    {
        pCopy = new CCTurnOffTiles();
        pZone = pNewZone = new CCZone(pCopy);
    }

    CCTiledGrid3DAction::copyWithZone(pZone);

    pCopy->initWithDuration(m_fDuration, m_sGridSize, m_nSeed );

    CC_SAFE_DELETE(pNewZone);
    return pCopy;
}