ProgressTimer* ProgressTimer::create(Sprite* sp) { ProgressTimer *progressTimer = new ProgressTimer(); if (progressTimer->initWithSprite(sp)) { progressTimer->autorelease(); } else { delete progressTimer; progressTimer = nullptr; } return progressTimer; }
ProgressTimer* ProgressTimer::create(Sprite* sp) { ProgressTimer *pProgressTimer = new ProgressTimer(); if (pProgressTimer->initWithSprite(sp)) { pProgressTimer->autorelease(); } else { delete pProgressTimer; pProgressTimer = NULL; } return pProgressTimer; }
ProgressTimer* ProgressTimer::create(Sprite* sp) { sp->setCascadeOpacityEnabled(true); ProgressTimer *progressTimer = new (std::nothrow) ProgressTimer(); if (progressTimer->initWithSprite(sp)) { progressTimer->autorelease(); progressTimer->setCascadeOpacityEnabled(true); } else { delete progressTimer; progressTimer = nullptr; } return progressTimer; }