CCLens3D* CCLens3D::create(float duration, const CCSize& gridSize, const CCPoint& position, float radius) { CCLens3D *pAction = new CCLens3D(); if (pAction) { if (pAction->initWithDuration(duration, gridSize, position, radius)) { pAction->autorelease(); } else { CC_SAFE_RELEASE_NULL(pAction); } } return pAction; }
CCObject* CCLens3D::copyWithZone(CCZone *pZone) { CCZone* pNewZone = NULL; CCLens3D* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { //in case of being called at sub class pCopy = (CCLens3D*)(pZone->m_pCopyObject); } else { pCopy = new CCLens3D(); pZone = pNewZone = new CCZone(pCopy); } CCGrid3DAction::copyWithZone(pZone); pCopy->initWithDuration(m_fDuration, m_sGridSize, m_position, m_fRadius); CC_SAFE_DELETE(pNewZone); return pCopy; }