// // Place // CCPlace * CCPlace::actionWithPosition(CCPoint pos) { CCPlace *pRet = new CCPlace(); pRet->initWithPosition(pos); pRet->autorelease(); return pRet; }
// // Place // CCPlace* CCPlace::actionWithPosition(const CCPoint& pos) { CCPlace *pRet = new CCPlace(); if (pRet && pRet->initWithPosition(pos)) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet); return NULL; }
CCPlace* CCPlace::create(const CCPoint& pos) { CCPlace *pRet = new CCPlace(); if (pRet && pRet->initWithPosition(pos)) { CC_SAFE_AUTORELEASE(pRet); return pRet; } CC_SAFE_DELETE(pRet); return NULL; }
CCPlace* CCPlace::create ( const CCPoint& tPosition ) { CCPlace* pRet = new CCPlace ( ); if ( pRet && pRet->initWithPosition ( tPosition ) ) { pRet->autorelease ( ); } else { CC_SAFE_DELETE ( pRet ); } return pRet; }
CCObject * CCPlace::copyWithZone(CCZone *pZone) { CCZone *pNewZone = NULL; CCPlace *pRet = NULL; if (pZone && pZone->m_pCopyObject) { pRet = (CCPlace*) (pZone->m_pCopyObject); } else { pRet = new CCPlace(); pZone = pNewZone = new CCZone(pRet); } CCActionInstant::copyWithZone(pZone); pRet->initWithPosition(m_tPosition); CC_SAFE_DELETE(pNewZone); return pRet; }