public void Animate(int targetValue) { if (targetValue != CurrentValue) { if (Animation != null) { Proxy.StopCoroutine(Animation); } CurrentValue = targetValue; Animation = Proxy.StartCoroutine(AnimationRoutine(targetValue)); } }