Example #1
0
        private void Update()
        {
            if (!watchForEnd)
            {
                this.enabled = false;
            }

            if (currentlyPlaying < 0)
            {
                return;
            }

            TweenQueueItem current = itemQueue[currentlyPlaying];

            foreach (TweenBase currentTween in current.tweens)
            {
                if (currentTween != null && currentTween.enabled && (currentTween.interpolation.loop == false || currentTween.interpolation.loopNumberOfTimes > 0))
                {
                    return;                     //don't do anything if somethings playing.
                }
            }
            current.onEnd?.Invoke();
            //if we get here without returning everything should be finished.
            currentlyPlaying = -1;            //stop Watching
            this.enabled     = false;
        }
        private void SetQueueState(TweenQueueItem queue, float lerp)
        {
            foreach (var tween in queue.tweens)
            {
                if (!tween)
                {
                    continue;
                }

                tween.SetToLerpPoint(lerp);
            }

            //Debug.Log("Setting : " +queue.label + " to " + lerp);
        }