Ejemplo n.º 1
0
    public IEnumerator OntoTheNextRow()
    {
        // Safety wait for other scripts.
        yield return(new WaitForSeconds(Constants.SECONDS_BEFORE_INIT_SCRIPTS));

        // move the cover.
        m_rows[m_currentRow].UnCover();
        m_selectItemsManager.SetUp();

        m_audioSource.PlayOneShot(m_slideSound);

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

        // In Medium supermode, we show clouds on top of items to hide them.
        if (Game.SuperMode == Game.Difficulty.Medium)
        {
            // show clouds first.
            m_rows[m_currentRow].ShowClouds();

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

            // than uncover select bar after clouds appear.
            m_selectItemsManager.UnCoverItems();
        }
        else if (Game.SuperMode != Game.Difficulty.Hard)
        {
            m_selectItemsManager.UnCoverItems();
        }

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

        // activate timer for hard.
        if (Game.SuperMode == Game.Difficulty.Hard)
        {
            Global.timerRunning = true;
        }
    }