Territory/Assets/Game/Script/Utils/Tweening/TweenBezier.cs
/// <summary>
/// begin the tween (cubic bezier curve)
/// </summary>
/// <param name="go"></param>
/// <param name="duration"></param>
/// <param name="targetPoint"></param>
/// <returns></returns>
begin the tween (cubic bezier curve)
begin the tween ( cubic bezier curve )
static public TweenBezier Begin(GameObject go, float duration, Vector3 controlPoint1, Vector3 controlPoint2, Vector3 targetPoint)
    {
        TweenBezier comp = UITweener.Begin<TweenBezier>(go, duration);
        comp.m_type = eCurveType.CUBIC;
        comp.p0 = comp.value;
        comp.p1 = controlPoint1;
        comp.p2 = controlPoint2;
        comp.p3 = targetPoint;
        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return comp;
    }
static public TweenBezier Begin ( GameObject go , float duration , Vector3 controlPoint1 , Vector3 controlPoint2 , Vector3 targetPoint ) { TweenBezier comp = UITweener . Begin < TweenBezier > ( go , duration ) ; comp . m_type = eCurveType . CUBIC ; comp . p0 = comp . value ; comp . p1 = controlPoint1 ; comp . p2 = controlPoint2 ; comp . p3 = targetPoint ; if ( duration <= 0f ) { comp . Sample ( 1f , true ) ; comp . enabled = false ; } return comp ; }
begin the tween (cubic bezier curve)
begin the tween ( cubic bezier curve )
None
go
GameObject
None
duration
float
None
controlPoint1
Vector3
controlPoint2
Vector3
targetPoint
Vector3
None