Example #1
0
    //--------------------------------------
    // GameObject
    //--------------------------------------


    public static void MoveTo(this GameObject go, Vector3 position, float time, SA.Common.Animation.EaseType easeType = SA.Common.Animation.EaseType.linear, System.Action OnCompleteAction = null)
    {
        SA.Common.Animation.ValuesTween tw = go.AddComponent <SA.Common.Animation.ValuesTween>();

        tw.DestoryGameObjectOnComplete = false;
        tw.VectorTo(go.transform.position, position, time, easeType);

        tw.OnComplete += OnCompleteAction;
    }
Example #2
0
 private void Animate(float from, float to, SA.Common.Animation.EaseType easeType)
 {
     _CurrentTween = SA.Common.Animation.ValuesTween.Create();
     _CurrentTween.OnValueChanged += HandleOnValueChanged;
     _CurrentTween.ValueTo(from, to, 0.5f, easeType);
 }
Example #3
0
 void HandleOnOutTweenComplete()
 {
     _CurrentTween = null;
 }
Example #4
0
 void HandleOnInTweenComplete()
 {
     _CurrentTween = null;
     Invoke("NotificationDelayComplete", 2f);
 }
Example #5
0
    //--------------------------------------
    // Handlers
    //--------------------------------------

    private void HandleOnInTweenComplete()
    {
        _CurrentTween = null;
    }