Пример #1
0
ParticleFireworks* ParticleFireworks::createWithTotalParticles(unsigned int numberOfParticles)
{
    ParticleFireworks* pRet = new ParticleFireworks();
    if (pRet && pRet->initWithTotalParticles(numberOfParticles))
    {
        pRet->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(pRet);
    }
    return pRet;
}
ParticleFireworks* ParticleFireworks::createWithTotalParticles(int numberOfParticles)
{
    ParticleFireworks* ret = new (std::nothrow) ParticleFireworks();
    if (ret && ret->initWithTotalParticles(numberOfParticles))
    {
        ret->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(ret);
    }
    return ret;
}