Beispiel #1
0
        public void OnApplicationQuit()
        {
            SceneManager.activeSceneChanged -= this.OnActiveSceneChanged;

            if (gamePauseManager != null)
            {
                RemoveSubscriber(gamePauseManager, "_gameDidPauseSignal", OnGamePause);
                RemoveSubscriber(gamePauseManager, "_gameDidResumeSignal", OnGameResume);
            }

            if (scoreController != null)
            {
                scoreController.noteWasCutEvent          -= OnNoteWasCut;
                scoreController.noteWasMissedEvent       -= OnNoteWasMissed;
                scoreController.scoreDidChangeEvent      -= OnScoreDidChange;
                scoreController.comboDidChangeEvent      -= OnComboDidChange;
                scoreController.multiplierDidChangeEvent -= OnMultiplierDidChange;
            }

            if (gameplayManager != null)
            {
                RemoveSubscriber(gameplayManager, "_levelFinishedSignal", OnLevelFinished);
                RemoveSubscriber(gameplayManager, "_levelFailedSignal", OnLevelFailed);
            }

            if (beatmapObjectCallbackController != null)
            {
                beatmapObjectCallbackController.beatmapEventDidTriggerEvent -= OnBeatmapEventDidTrigger;
            }

            server.StopServer();
        }
        public void OnApplicationQuit()
        {
            SceneManager.sceneLoaded -= OnSceneLoaded;

            if (gamePauseManager != null)
            {
                RemoveSubscriber(gamePauseManager, "_gameDidPauseSignal", OnGamePause);
                RemoveSubscriber(gamePauseManager, "_gameDidResumeSignal", OnGameResume);
            }

            if (scoreController != null)
            {
                scoreController.noteWasCutEvent          += OnNoteWasCut;
                scoreController.noteWasMissedEvent       -= OnNoteWasMissed;
                scoreController.scoreDidChangeEvent      += OnScoreDidChange;
                scoreController.comboDidChangeEvent      += OnComboDidChange;
                scoreController.multiplierDidChangeEvent += OnMultiplierDidChange;
            }

            if (gameplayManager != null)
            {
                RemoveSubscriber(gameplayManager, "_levelFinishedSignal", OnLevelFinished);
                RemoveSubscriber(gameplayManager, "_levelFailedSignal", OnLevelFailed);
            }

            server.StopServer();
        }
Beispiel #3
0
        public void OnApplicationQuit()
        {
            SceneManager.activeSceneChanged -= OnActiveSceneChanged;

            CleanUpSong();

            CleanUpMultiplayer();

            server.StopServer();
        }
Beispiel #4
0
        public void OnApplicationQuit()
        {
            SceneManager.activeSceneChanged -= OnActiveSceneChanged;

            if (gamePause != null)
            {
                gamePause.didPauseEvent  -= OnGamePause;
                gamePause.didResumeEvent -= OnGameResume;
            }

            if (scoreController != null)
            {
                scoreController.noteWasCutEvent          -= OnNoteWasCut;
                scoreController.noteWasMissedEvent       -= OnNoteWasMissed;
                scoreController.scoreDidChangeEvent      -= OnScoreDidChange;
                scoreController.comboDidChangeEvent      -= OnComboDidChange;
                scoreController.multiplierDidChangeEvent -= OnMultiplierDidChange;
            }

            if (standardLevelGameplayManager != null)
            {
                standardLevelGameplayManager.levelFinishedEvent -= OnLevelFinished;
                standardLevelGameplayManager.levelFailedEvent   -= OnLevelFailed;
            }

            if (missionLevelGameplayManager != null)
            {
                missionLevelGameplayManager.levelFinishedEvent -= OnLevelFinished;
                missionLevelGameplayManager.levelFailedEvent   -= OnLevelFailed;
            }

            if (beatmapObjectCallbackController != null)
            {
                beatmapObjectCallbackController.beatmapEventDidTriggerEvent -= OnBeatmapEventDidTrigger;
            }

            server.StopServer();
        }