Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="oldState"></param>
        private static void OnStateChanged(GameplayState oldState)
        {
            switch (_state)
            {
            case GameplayState.GameRunning:
                Time.timeScale = 1.0f;
                break;

            case GameplayState.Cutscene:
                Time.timeScale = 0.0f;
                break;

            case GameplayState.GamePaused:
                TweenExtensions.SetCutscenesActive(false);
                AnimatorExtensions.SetCutscenesPlaying(false);
                AudioExtensions.SetGameplayLoopingPlaying(false);
                Time.timeScale = 0.0f;
                break;
            }

            if (oldState == GameplayState.GamePaused && oldState != _state)
            {
                TweenExtensions.SetCutscenesActive(true);
                AnimatorExtensions.SetCutscenesPlaying(true);
                AudioExtensions.SetGameplayLoopingPlaying(true);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="scene"></param>
        public static void DeinitMap(Scene scene)
        {
            CameraShakeManager.instance.Deinit();

            DG.Tweening.DOTween.Clear();

            Telemetry.EndGame(scene);
            AudioExtensions.ClearGameplayLoopings();
        }