Ejemplo n.º 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;
    }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
 void HandleOnOutTweenComplete()
 {
     _CurrentTween = null;
 }
Ejemplo n.º 4
0
 void HandleOnInTweenComplete()
 {
     _CurrentTween = null;
     Invoke("NotificationDelayComplete", 2f);
 }
Ejemplo n.º 5
0
    //--------------------------------------
    // Handlers
    //--------------------------------------

    private void HandleOnInTweenComplete()
    {
        _CurrentTween = null;
    }