CCShuffleTiles* CCShuffleTiles::create(float duration, const CCSize& gridSize) { CCShuffleTiles *pAction = new CCShuffleTiles(); if (pAction) { if (pAction->initWithDuration(duration, gridSize)) { pAction->autorelease(); } else { CC_SAFE_RELEASE_NULL(pAction); } } return pAction; }
CCShuffleTiles* CCShuffleTiles::create(float duration, const CCSize& gridSize, unsigned int seed) { CCShuffleTiles *pAction = new CCShuffleTiles(); if (pAction) { if (pAction->initWithDuration(duration, gridSize, seed)) { CC_SAFE_AUTORELEASE(pAction); } else { CC_SAFE_RELEASE_NULL(pAction); } } return pAction; }
CCObject* CCShuffleTiles::copyWithZone(CCZone *pZone) { CCZone* pNewZone = NULL; CCShuffleTiles* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { pCopy = (CCShuffleTiles*)(pZone->m_pCopyObject); } else { pCopy = new CCShuffleTiles(); pZone = pNewZone = new CCZone(pCopy); } CCTiledGrid3DAction::copyWithZone(pZone); pCopy->initWithDuration(m_fDuration, m_sGridSize); CC_SAFE_DELETE(pNewZone); return pCopy; }