Beispiel #1
0
 private void OnGameStarted()
 {
     _update          = Constants.Noop;
     _isExecutingSong = false;
     _prevStreakPower = 0;
     _streakPower     = 0;
     _beatInputService.MetronomeTick += MetronomeTick;
     streakText.StartAnimation();
 }
Beispiel #2
0
        private void OnGameFinishing()
        {
            float    finishTime       = Time.time - startTime;
            TimeSpan fromMilliseconds = TimeSpan.FromSeconds(finishTime);

            timeText.text = fromMilliseconds.Minutes + ":" + fromMilliseconds.Seconds;
            StartCoroutine(AnimateSummary());
            StartCoroutine(Coroutines.FadeTo(finishText.GetComponent <CanvasGroup>(), 1, BeatInputService.NOTE_TIME));

            iTween.MoveFrom(finishText.gameObject, new Vector3(Screen.width * .5f, Screen.height * .5f, 0), 1);
            finishText.StartAnimation();
            finishText.TriggerImpulse();
        }
Beispiel #3
0
 private void FinishTutorial()
 {
     OnDestroy();
     _gameStateService.TriggerGameFinishing();
     StartCoroutine(Coroutines.FadeTo(songLearnedText.GetComponent <CanvasGroup>(), 1, .25f));
     StartCoroutine(Coroutines.FadeTo(songTutorial, 0, .5f));
     songLearnedText.StartAnimation();
     songLearnedText.TriggerImpulse();
     ServiceLocator.Get <PersistenceService>().SaveCurrentPlayer();
     iTween.ScaleBy(pageToScale.gameObject, Vector3.one / 1.05f, 5);
     StartCoroutine(Coroutines.ExecuteAfterSeconds(1.5f, () => {
         _update = () => {
             if (Input.GetMouseButtonDown(0))
             {
                 _update = Constants.Noop;
                 _gameStateService.CurrentLevelData = targetLevel;
                 _gameStateService.TriggerSceneTransition(BuildScenes.Ingame);
             }
         };
     }));
 }