Ejemplo n.º 1
0
    IEnumerator StartGameRoutine()
    {
        if (messageWindow != null)
        {
            messageWindow.GetComponent <RectXformMover>().MoveOn();
            messageWindow.ShowMessage(goalIcon, "SCORE GOAL\n" + scoreGoal.ToString(), scene.name, "Play!");
        }

        while (!m_isReadyToBegin)
        {
            yield return(null);
        }

        // fade out overlay screne
        if (screenFader != null)
        {
            screenFader.FadeOff();
        }

        yield return(new WaitForSeconds(0.5f));

        // setup gameboard
        if (m_board != null)
        {
            m_board.SetupBoard();
        }
    }
Ejemplo n.º 2
0
    private IEnumerator StartGameRoutine()
    {
        if (messageWindow != null)
        {
            messageWindow.GetComponent <RectXformMover>().MoveOn();
            messageWindow.ShowMessage(goalIcon, "points goal\n" + scoreGoal.ToString(), "start");
        }

        while (!mIsReadyToBegin)
        {
            yield return(null);
        }

        if (screenFader != null)
        {
            screenFader.FadeOff();
        }

        yield return(new WaitForSeconds(0.5f));

        if (mBoard != null)
        {
            mBoard.SetupBoard();
        }
    }
Ejemplo n.º 3
0
    IEnumerator StartGameRoutine()
    {
        if (messageWindow != null)
        {
            messageWindow.GetComponent <RectXformMover>().MoveOn();
            messageWindow.ShowMessage(goalIcon, "Objective for this level\n" + m_levelGoal.scoreGoals[0].ToString(), "Start");
        }

        while (!m_isReadyToBegin)
        {
            yield return(null);
        }

        if (screenFader != null)
        {
            screenFader.FadeOff();
        }

        yield return(new WaitForSeconds(0.75f));

        if (m_board != null)
        {
            m_board.SetupBoard();
        }
    }
Ejemplo n.º 4
0
    IEnumerator StartGameRoutine()
    {
        if (messageWindow != null)
        {
            messageWindow.GetComponent <RectXFormMover>().MoveOn();
            messageWindow.ShowMessage(goalIcon, LevelGoal.goalsText, "start");
        }
        while (!m_isReadyToBegin)
        {
            yield return(null);
            //yield return new WaitForSeconds(2f);
            //m_isReadyToBegin = true;
        }

        if (screenFader != null)
        {
            screenFader.FadeOff();
        }

        yield return(new WaitForSeconds(1f));

        if (m_board != null)
        {
            m_board.SetupBoard();
        }
    }
Ejemplo n.º 5
0
    // coroutine for the level introduction
    IEnumerator StartGameRoutine()
    {
        // show the message window with the level goal
        if (messageWindow != null)
        {
            messageWindow.GetComponent <RectXformMover>().MoveOn();
            messageWindow.ShowMessage(goalIcon, "score goal\n" + scoreGoal.ToString(), "start");
        }

        // wait until the player is ready
        while (!m_isReadyToBegin)
        {
            yield return(null);
        }

        // fade off the ScreenFader
        if (screenFader != null)
        {
            screenFader.FadeOff();
        }

        // wait half a second
        yield return(new WaitForSeconds(0.5f));

        // setup the Board
        if (m_board != null)
        {
            m_board.SetupBoard();
        }
    }
Ejemplo n.º 6
0
        IEnumerator FadeAndLoadRoutine()
        {
            yield return(new WaitForSeconds(_delay));

            _screenFader.FadeOff();
            LevelLoader.LoadMainMenuLevel();

            // destroy the splash screen after the fade off effect finishes
            Destroy(gameObject, _screenFader.FadeOffDuration);
        }
Ejemplo n.º 7
0
        private IEnumerator FadeAndLoadRoutine()
        {
            yield return(new WaitForSeconds(delay));

            screenFader.FadeOff();
            LevelLoader.instance.LoadMainMenuLevel();
            yield return(new WaitForSeconds(screenFader.FadeOffDuration));

            Destroy(gameObject);
        }
Ejemplo n.º 8
0
        private IEnumerator FadeAndLoadRoutine()
        {
            yield return(new WaitForSeconds(delay));

            LevelLoader.LoadMainMenuLevel();
            _screenFader.FadeOff();
            var time = _screenFader.FadeOnDuration;

            yield return(new WaitForSeconds(time));

            Destroy(gameObject);
        }
Ejemplo n.º 9
0
        // coroutine to fade off the ScreenFader and load the main menu
        private IEnumerator FadeAndLoadRoutine()
        {
            yield return(new WaitForSeconds(delay));

            _screenFader.FadeOff();

            LevelLoader.LoadMainMenuLevel();

            _splashText.text    = "";
            _splashImage.active = false;

            yield return(new WaitForSeconds(_screenFader.FadeOffDuration));

            Object.Destroy(gameObject);
        }
Ejemplo n.º 10
0
        // coroutine to fade off the ScreenFader and load the MainMenu
        private IEnumerator FadeAndLoadRoutine()
        {
            // wait for a delay
            yield return(new WaitForSeconds(delay));

            // fade off
            _screenFader.FadeOff();

            // load the MainMenu scene
            LevelLoader.LoadMainMenuLevel();

            // wait for fade to complete
            yield return(new WaitForSeconds(_screenFader.FadeOffDuration));

            // destroy the SplashScreen object
            Object.Destroy(gameObject);
        }
Ejemplo n.º 11
0
    IEnumerator StartGameRoutine()
    {
        while (!m_isReadyToBegin)
        {
            yield return(null);

            yield return(new WaitForSeconds(2f));

            m_isReadyToBegin = true;
        }

        if (screenFader != null)
        {
            screenFader.FadeOff();
        }

        yield return(new WaitForSeconds(0.5f));

        if (m_board != null)
        {
            m_board.SetupBoard();
        }
    }