CCShakyTiles3D* CCShakyTiles3D::actionWithRange(int nRange, bool bShakeZ,const ccGridSize& gridSize, ccTime duration) { CCShakyTiles3D *pAction = new CCShakyTiles3D(); if (pAction) { if (pAction->initWithRange(nRange, bShakeZ, gridSize, duration)) { pAction->autorelease(); } else { CC_SAFE_RELEASE_NULL(pAction); } } return pAction; }
CCObject* CCShakyTiles3D::copyWithZone(CCZone *pZone) { CCZone* pNewZone = NULL; CCShakyTiles3D* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { //in case of being called at sub class pCopy = (CCShakyTiles3D*)(pZone->m_pCopyObject); } else { pCopy = new CCShakyTiles3D(); pZone = pNewZone = new CCZone(pCopy); } CCTiledGrid3DAction::copyWithZone(pZone); pCopy->initWithRange(m_nRandrange, m_bShakeZ, m_sGridSize, m_fDuration); CC_SAFE_DELETE(pNewZone); return pCopy; }