CCProgressTimer* CCProgressTimerCreator::createNode() { CCProgressTimer* pProgressTimer = new CCProgressTimer(); if(pProgressTimer) { pProgressTimer->autorelease(); return pProgressTimer; } CC_SAFE_DELETE(pProgressTimer); return NULL; }
CCProgressTimer* CCProgressTimer::create(CCSprite* sp, CCProgressTimerType type) { CCProgressTimer* pProgressTimer = new CCProgressTimer(); if (pProgressTimer->initWithSprite(sp)) { pProgressTimer->autorelease(); } else { delete pProgressTimer; pProgressTimer = NULL; } pProgressTimer->setType(type); return pProgressTimer; }