//execute tween: static IEnumerator <float> RunTween(TweenBase tween) { Tween.activeTweens.Add(tween); while (true) { //tick tween: if (!tween.Tick()) { //clean up tween: Tween.activeTweens.Remove(tween); yield break; } //loop: yield return(0); } }
//Coroutines: //execute tween: static IEnumerator RunTween(TweenBase tween) { Tween.activeTweens.Add(tween); //Debug.Log("Nuevo Tween"); while (true) { //tick tween: if (!tween.Tick()) { //Debug.Log("Tween ya no hace tick"); //clean up tween: Tween.activeTweens.Remove(tween); yield break; } //loop: yield return(null); } }