private void ExecutionStarting(Song song, int streakPower) { if (streakPower > _prevStreakPower) { StartCoroutine(Coroutines.FadeTo(streakText.GetComponent <CanvasGroup>(), 1, BeatInputService.HALF_NOTE_TIME)); streakText.SetGradient(streakPowerGradients[streakPower - 1]); streakText.TriggerImpulse(); } _prevStreakPower = streakPower; }
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(); }
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); } }; })); }