protected override bool DoStep(float deltaTime)
        {
            if (m_tweens.Count == 0)
            {
                return(true);
            }

            var tween = m_tweens[m_currentIndex];

            if (tween != m_currentTween)
            {
                m_currentTween = tween;
                m_currentTween.Start();
            }

            m_currentTween.Step(deltaTime);

            if (!m_currentTween.isRunning)
            {
                m_currentTween = null;

                if (m_currentIndex < m_tweens.Count - 1)
                {
                    m_currentIndex++;
                }
                else
                {
                    if (isInfinite || m_currentIteration++ < repeatCount)
                    {
                        m_currentIndex = 0;

                        if (m_externRepeat != null)
                        {
                            m_externRepeat(m_currentIteration);
                        }
                    }
                    else
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
Exemplo n.º 2
0
        private void UpdateQueued(float deltaTime)
        {
            if (m_currentEnqueued == null)
            {
                if (m_queue.Count > 0)
                {
                    m_currentEnqueued = m_queue.Dequeue();
                    m_currentEnqueued.Start();
                    m_currentEnqueued.Step(deltaTime);
                }
            }
            else
            {
                m_currentEnqueued.Step(deltaTime);

                if (!m_currentEnqueued.isRunning)
                {
                    m_currentEnqueued = null;
                }
            }
        }