Ejemplo n.º 1
0
    private IEnumerator EndGame()
    {
        // In medium, we remove clouds first, than close covers.
        if (Game.SuperMode == Game.Difficulty.Medium)
        {
            // destroy clouds.
            m_rows[m_currentRow].DestroyClouds();

            yield return(new WaitForSeconds(Constants.CLOUD_TIME));

            // than, cover row.
            m_rows[m_currentRow].Cover();
        }
        else
        {
            m_rows[m_currentRow].Cover();             // cover the done row.
        }

        yield return(new WaitForSeconds(Constants.COVER_MOVE_TIME + Constants.INBETWEEN_COVERS_TIME));

        // close select items.
        m_selectItemsManager.CoverItems();

        yield return(new WaitForSeconds(Constants.COVER_MOVE_TIME + Constants.INBETWEEN_COVERS_TIME));

        m_audioSource.PlayOneShot(m_endGameSound);
        Global.lockMouse = true;

        yield return(new WaitForSeconds(Constants.COVER_MOVE_TIME + Constants.INBETWEEN_COVERS_TIME));

        // add item to show reel.
        m_showReel.Add(m_rightItems[0]);

        Global.state = Global.State.ShowReel;

        // start show reel.
        m_showReel.Begin(true);
    }