Exemplo n.º 1
0
 private IEnumerator OnPlayPressedRoutine()
 {
     TransitionFader.PlayTransition(startTransitionPrefab);
     LevelLoader.LoadNextLevel();
     GameMenu.Open();
     yield return(new WaitForSeconds(_playDelay));
 }
Exemplo n.º 2
0
        private IEnumerator OnPlayPressedRoutine()
        {
            TransitionFader.PlayTransition(startTransitionPrefab);
            LevelLoader.LoadNextLevel();
            yield return(new WaitForSeconds(_playDelay)); // i dont like this solution. It adds .5 seconds delay on key press.

            GameMenu.Open();
        }
Exemplo n.º 3
0
        private IEnumerator PlayMissionRoutine(string sceneName)
        {
            TransitionFader.PlayTransition(_playTrasitionPrefab);
            LevelLoader.LoadLevel(sceneName);
            yield return(new WaitForSeconds(_playDelay));

            GameMenu.Open();
        }
Exemplo n.º 4
0
        IEnumerator OnCollectModePressedRoutine()
        {
            TransitionFader.PlayTransition(startTransitionPrefab);
            LevelLoader.LoadCollectModeLevel();
            yield return(new WaitForSeconds(_playDelay));

            GameMenu.Open();
        }
Exemplo n.º 5
0
        // restart tutorial coroutine
        private IEnumerator OnRestartTutorialPressedRoutine()
        {
            TransitionFader.PlayTransition(levelTransitionPrefab, 1);
            yield return(new WaitForSeconds(_playDelay));

            LevelLoader.LoadLevel("2_Level-1");
            base.OnBackPressed();
            _active = false;
        }
Exemplo n.º 6
0
        // restart level coroutine
        private IEnumerator OnRestartLevelPressedRoutine()
        {
            TransitionFader.PlayTransition(levelTransitionPrefab, LevelLoader.CurrentSceneIndex - 1);
            yield return(new WaitForSeconds(_playDelay));

            base.OnBackPressed();
            LevelLoader.ReloadLevel();
            _active = false;
        }
Exemplo n.º 7
0
        // start the transition and play the first level
        private IEnumerator OnPlayPressedRoutine()
        {
            TransitionFader.PlayTransition(startTransitionPrefab, LevelLoader.CurrentSceneIndex);
            yield return(new WaitForSeconds(_playDelay));

            LevelLoader.LoadNextLevel();
            GameMenu.Open();
            _active = false;
        }
Exemplo n.º 8
0
        private IEnumerator OnNextPressedRoutine()
        {
            TransitionFader.PlayTransition(_transitionPrefab, LevelLoader.CurrentSceneIndex);
            yield return(new WaitForSeconds(_playDelay));

            LevelLoader.LoadNextLevel();
            base.OnBackPressed();
            _active = false;
        }
Exemplo n.º 9
0
        // start the transition and play the first level
        private IEnumerator OnPlayPressedRoutine()
        {
            TransitionFader.PlayTransition(startTransitionPrefab, "In The Beginning...");
            yield return(new WaitForSeconds(_playDelay));

            if (PlayerController.Instance != null)
            {
                PlayerController.Instance.UnfreezePlayer();
            }
            LevelLoader.LoadNextLevel();
            GameMenu.Open();
            _active = false;
        }