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