private void OnSceneTransitionStarted(BuildScenes?from, BuildScenes to)
 {
     StartCoroutine(Coroutines.FadeTo(_canvasGroup, 1, transitionTime, () => {
         SceneManager.LoadSceneAsync((int)to).completed +=
             operation => StartCoroutine(
                 Coroutines.FadeTo(_canvasGroup, 0, transitionTime, () => {
             _gameStateService.TriggerSceneTransitionFinished();
         }));
     }));
 }
Esempio n. 2
0
 public void TriggerSceneTransition(BuildScenes to)
 {
     _buildSceneFrom = _currentBuildScene;
     _buildSceneTo   = to;
     SceneTransitionStarted?.Invoke(_buildSceneFrom, _buildSceneTo);
 }