internal static IEnumerator <Tweener> DoFrame_Internal(ProgressTweener tweener) { tweener.Progress++; while (tweener.Normalized < 1f) { yield return(tweener); tweener.Progress++; } }
public static Tweener DoFrame(int count) { if (count <= 0f) { throw new ArgumentException(nameof(count)); } ProgressTweener tweener = new ProgressTweener() { Target = count, }; tweener.Enumerator = DoFrame_Internal(tweener); return(tweener); }