ParticleExplosion* ParticleExplosion::createWithTotalParticles(int numberOfParticles)
{
    ParticleExplosion* ret = new (std::nothrow) ParticleExplosion();
    if (ret && ret->initWithTotalParticles(numberOfParticles))
    {
        ret->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(ret);
    }
    return ret;
}
Esempio n. 2
0
ParticleExplosion* ParticleExplosion::createWithTotalParticles(unsigned int numberOfParticles)
{
    ParticleExplosion* pRet = new ParticleExplosion();
    if (pRet && pRet->initWithTotalParticles(numberOfParticles))
    {
        pRet->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(pRet);
    }
    return pRet;
}
//
// ParticleExplosion
//
ParticleExplosion* ParticleExplosion::createFireWorksRing()
{
    ParticleExplosion* ret = new ParticleExplosion();
    if (ret && ret->initWithTotalParticles(200))
    {
        ret->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(ret);
    }
    return ret;
}