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(); } }
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(); } }
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(); } }
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(); } }
// 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(); } }
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); }
private IEnumerator FadeAndLoadRoutine() { yield return(new WaitForSeconds(delay)); screenFader.FadeOff(); LevelLoader.instance.LoadMainMenuLevel(); yield return(new WaitForSeconds(screenFader.FadeOffDuration)); Destroy(gameObject); }
private IEnumerator FadeAndLoadRoutine() { yield return(new WaitForSeconds(delay)); LevelLoader.LoadMainMenuLevel(); _screenFader.FadeOff(); var time = _screenFader.FadeOnDuration; yield return(new WaitForSeconds(time)); Destroy(gameObject); }
// 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); }
// 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); }
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(); } }