public static void ScaleTo(this GameObject go, Vector3 scale, 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.ScaleTo(go.transform.localScale, scale, time, easeType); tw.OnComplete += OnCompleteAction; }
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); }