CCSplitRows* CCSplitRows::actionWithRows(int nRows, ccTime duration) { CCSplitRows *pAction = new CCSplitRows(); if (pAction) { if (pAction->initWithRows(nRows, duration)) { pAction->autorelease(); } else { CC_SAFE_RELEASE_NULL(pAction); } } return pAction; }
CCSplitRows* CCSplitRows::create(float duration, unsigned int nRows) { CCSplitRows *pAction = new CCSplitRows(); if (pAction) { if (pAction->initWithDuration(duration, nRows)) { pAction->autorelease(); } else { CC_SAFE_RELEASE_NULL(pAction); } } return pAction; }
CCObject* CCSplitRows::copyWithZone(CCZone *pZone) { CCZone* pNewZone = NULL; CCSplitRows* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { pCopy = (CCSplitRows*)(pZone->m_pCopyObject); } else { pCopy = new CCSplitRows(); pZone = pNewZone = new CCZone(pCopy); } CCTiledGrid3DAction::copyWithZone(pZone); pCopy->initWithDuration(m_fDuration, m_nRows); CC_SAFE_DELETE(pNewZone); return pCopy; }
NSObject* CCSplitRows::copyWithZone(cocos2d::NSZone *pZone) { NSZone* pNewZone = NULL; CCSplitRows* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { pCopy = (CCSplitRows*)(pZone->m_pCopyObject); } else { pCopy = new CCSplitRows(); pZone = pNewZone = new NSZone(pCopy); } CCTiledGrid3DAction::copyWithZone(pZone); pCopy->initWithRows(m_nRows, m_fDuration); CCX_SAFE_DELETE(pNewZone); return pCopy; }