Example #1
0
        internal static IEnumerator <Tweener> DoFrame_Internal(ProgressTweener tweener)
        {
            tweener.Progress++;
            while (tweener.Normalized < 1f)
            {
                yield return(tweener);

                tweener.Progress++;
            }
        }
Example #2
0
        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);
        }