public override void Update(float time)
 {
     if (m_one != null)
     {
         m_one.Update(time);
     }
     if (m_two != null)
     {
         m_two.Update(time);
     }
 }
Esempio n. 2
0
        public override void Update(float dt)
        {
            if (dt >= m_nextDt)
            {
                while (dt >= m_nextDt && m_total < m_times)
                {
                    m_innerAction.Update(1.0f);
                    m_total++;

                    m_innerAction.Stop();
                    m_innerAction.StartWithTarget(m_target);
                    m_nextDt = m_innerAction.Duration / m_duration * (m_total + 1);
                }

                if (Math.Abs(dt - 1.0f) < float.Epsilon && m_total < m_times)
                {
                    m_innerAction.Update(1.0f);

                    m_total++;
                }

                if (!m_actionInstant)
                {
                    if (m_total == m_times)
                    {
                        m_innerAction.Stop();
                    }
                    else
                    {
                        m_innerAction.Update(dt - (m_nextDt - m_innerAction.Duration / m_duration));
                    }
                }
            }
            else
            {
                var progress = (dt * m_times) % 1.0f;
                m_innerAction.Update(progress);
            }
        }