Пример #1
0
    public void UpdateState()
    {
        m_progress += Time.deltaTime / m_transitionTime;

        m_progress = Mathf.Clamp01(m_progress);

        foreach (GridObject gridObject in m_grid.GetGridObjects())
        {
            gridObject.UpdateMovement(m_progress);
        }

        if (m_progress == 1.0f)
        {
            m_gameFlow.AdvanceState();
        }
    }
Пример #2
0
    public void UpdateState()
    {
        m_progress += Time.deltaTime / m_transitionTime;

        m_progress = Mathf.Clamp01(m_progress);

        if (!m_complete)
        {
            foreach (GridObject gridObject in m_grid.GetGridObjects())
            {
                gridObject.UpdateAction(m_progress);
            }

            m_complete = true;
        }

        if (m_progress == 1.0f)
        {
            m_gameFlow.AdvanceState();
        }
    }