示例#1
0
ParticleSnow* ParticleSnow::createWithTotalParticles(unsigned int numberOfParticles)
{
    ParticleSnow* pRet = new ParticleSnow();
    if (pRet && pRet->initWithTotalParticles(numberOfParticles))
    {
        pRet->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(pRet);
    }
    return pRet;
}
ParticleSnow* ParticleSnow::createWithTotalParticles(int numberOfParticles)
{
    ParticleSnow* ret = new (std::nothrow) ParticleSnow();
    if (ret && ret->initWithTotalParticles(numberOfParticles))
    {
        ret->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(ret);
    }
    return ret;
}
示例#3
0
ParticleSnow* ParticleSnow::create()
{
    ParticleSnow* pRet = new ParticleSnow();
    if (pRet && pRet->init())
    {
        pRet->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(pRet);
    }
    return pRet;
}
ParticleSnow* ParticleSnow::create()
{
    ParticleSnow* ret = new (std::nothrow) ParticleSnow();
    if (ret && ret->init())
    {
        ret->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(ret);
    }
    return ret;
}