//execute tween: static IEnumerator 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(null); } }
public void ExecuteTween(TweenBase tween) { StartCoroutine(RunTween(tween)); }