示例#1
0
CCProgressTimer* CCProgressTimerCreator::createNode()
{
    CCProgressTimer* pProgressTimer = new CCProgressTimer();
    if(pProgressTimer)
    {
        pProgressTimer->autorelease();
        return pProgressTimer;
    }
    CC_SAFE_DELETE(pProgressTimer);
    return NULL;
}
示例#2
0
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;
}