Exemplo n.º 1
0
        public void FastQuitGame()
        {
            //正常退出,则清除

            Game.PopupComponent.CloseNoticeUI();

            ClearReBackData();

            DDZGameHelper.Reset();

            DDZUIFactory.gameScene.Remove();

            UI overUI = Game.Scene.GetComponent <UIComponent>().Get(UIType.UIDDZOverPanel);

            if (overUI != null)
            {
                DDZUIFactory.overPanel.Remove();
            }

            this.Reset();

            DataCenterComponent.Instance.userInfo.deleteAllUserExcptMe();

            if (DDZConfig.GameScene.PlayerListsPanel != null)
            {
                Game.PopupComponent.ClosePlayerListPanel();
            }

            if (_BackHall)
            {
                Game.EventSystem.Run(EventIdType.SubGameReBackLobby);

                //音乐切换为大厅

                SoundHelper.SubGameExitResetSound();

                SoundComponent.Instance.Stop(CurrentSoundName);

                var _soundVolume = PlayerPrefs.GetFloat("SoundVolume", 1);

                SoundComponent.Instance.PlayMusic(DataCenterComponent.Instance.soundInfo.bg_hall, 0, _soundVolume, true);
            }
        }