コード例 #1
0
AccelDeccelAmplitude* AccelDeccelAmplitude::create(Action *action, float duration)
{
    AccelDeccelAmplitude *ret = new (std::nothrow) AccelDeccelAmplitude();
    if (ret && ret->initWithAction(action, duration))
    {
        ret->autorelease();
        return ret;
    }

    delete ret;
    return nullptr;
}
コード例 #2
0
ファイル: CCActionGrid.cpp プロジェクト: DominicD/Hyperdrive
AccelDeccelAmplitude* AccelDeccelAmplitude::create(Action *action, float duration)
{
    AccelDeccelAmplitude *ret = new (std::nothrow) AccelDeccelAmplitude();
    if (ret)
    {
        if (ret->initWithAction(action, duration))
        {
            ret->autorelease();
        }
        else
        {
            CC_SAFE_DELETE(ret);
        }
    }

    return ret;
}