示例#1
0
EaseElasticIn* EaseElasticIn::create(ActionInterval *action, float period/* = 0.3f*/)
{
    EaseElasticIn *ret = new (std::nothrow) EaseElasticIn();
    if (ret && ret->initWithAction(action, period))
    {
        ret->autorelease();
        return ret;
    }

    delete ret;
    return nullptr;
}
示例#2
0
EaseElasticIn* EaseElasticIn::create(ActionInterval *action, float period/* = 0.3f*/)
{
    EaseElasticIn *ret = new (std::nothrow) EaseElasticIn();
    if (ret)
    {
        if (ret->initWithAction(action, period))
        {
            ret->autorelease();
        }
        else
        {
            CC_SAFE_RELEASE_NULL(ret);
        }
    }

    return ret;
}
示例#3
0
EaseElasticIn* EaseElasticIn::create(ActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
    EaseElasticIn *pRet = new EaseElasticIn();
    if (pRet)
    {
        if (pRet->initWithAction(pAction, fPeriod))
        {
            pRet->autorelease();
        }
        else
        {
            CC_SAFE_RELEASE_NULL(pRet);
        }
    }

    return pRet; 
}
示例#4
0
Object* EaseElasticIn::copyWithZone(Zone *pZone)
{
    Zone* pNewZone = NULL;
    EaseElasticIn* pCopy = NULL;
    if(pZone && pZone->_copyObject) 
    {
        //in case of being called at sub class
        pCopy = (EaseElasticIn*)(pZone->_copyObject);
    }
    else
    {
        pCopy = new EaseElasticIn();
        pNewZone = new Zone(pCopy);
    }

    pCopy->initWithAction((ActionInterval *)(_inner->copy()->autorelease()), _period);

    CC_SAFE_DELETE(pNewZone);
    return pCopy;
}