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