Exemplo n.º 1
0
    public void UpdateCustom(float deltaTime)
    {
        if (m_finished)
        {
            return;
        }

        if (m_eventHandler != null)
        {
            m_elapsedTime += deltaTime;

            if (!m_eventHandler.CanUpdate && m_elapsedTime >= StartTime && StartTime >= 0f)
            {
                m_eventHandler.OnBegin();
            }

            if (m_eventHandler.CanUpdate)
            {
                m_eventHandler.Update(deltaTime);
            }

            //if this evet is hault by the time limitation, set finished true.
            //and then wait to the next Active() or Reset() to trigger its to unfinished.
            if (m_eventHandler.CanUpdate && m_elapsedTime > EndTime && EndTime > 0f)
            {
                ResetCustom();
                m_finished = true;
            }
        }
    }
Exemplo n.º 2
0
 public void UpdateCustom(float deltaTime)
 {
     if (m_eventHandler != null)
     {
         m_eventHandler.Update(deltaTime);
     }
 }