private void OnModeSelection(FreePlayMode mode)
        {
            if (SongBrowserTweaks.ModLoaded && !SongBrowserTweaks.Initialized && mode != FreePlayMode.Campaign)
            {
                StartCoroutine(GetSongBrowserButtons());
            }

            if (mode == FreePlayMode.Solo)
            {
                _freePlayFlowCoordinator = FindObjectOfType <SoloFreePlayFlowCoordinator>();
                (_freePlayFlowCoordinator as SoloFreePlayFlowCoordinator).didFinishEvent += OnFreePlayFlowCoordinatorFinished;

                ToggleButtonsActive(true);
                BeatSaverDownloaderTweaks.SetTopButtons(false);
            }
            else if (mode == FreePlayMode.Party)
            {
                _freePlayFlowCoordinator = FindObjectOfType <PartyFreePlayFlowCoordinator>();
                (_freePlayFlowCoordinator as PartyFreePlayFlowCoordinator).didFinishEvent += OnFreePlayFlowCoordinatorFinished;

                ToggleButtonsActive(true);
                BeatSaverDownloaderTweaks.SetTopButtons(false);
            }
            else if (mode == FreePlayMode.Campaign)
            {
                _freePlayFlowCoordinator = FindObjectOfType <CampaignFlowCoordinator>();
                (_freePlayFlowCoordinator as CampaignFlowCoordinator).didFinishEvent += OnFreePlayFlowCoordinatorFinished;

                ToggleButtonsActive(false);
                BeatSaverDownloaderTweaks.HideTopButtons();
            }

            SongBrowserTweaks.OnModeSelection();
        }
예제 #2
0
        private void OnModeSelection(FreePlayMode mode)
        {
            if (mode == FreePlayMode.Solo)
            {
                _freePlayFlowCoordinator = FindObjectOfType <SoloFreePlayFlowCoordinator>();
                (_freePlayFlowCoordinator as SoloFreePlayFlowCoordinator).didFinishEvent += OnFreePlayFlowCoordinatorFinished;

                if (!SongBrowserTweaks.ModLoaded)
                {
                    PrepareLevelPackSelectedEvent();
                    StartCoroutine(UIUtilities.DelayedAction(SelectSavedLevelPack));
                }
                else if (!SongBrowserTweaks.Initialized)
                {
                    StartCoroutine(GetSongBrowserButtons());
                }
            }
            else if (mode == FreePlayMode.Party)
            {
                _freePlayFlowCoordinator = FindObjectOfType <PartyFreePlayFlowCoordinator>();
                (_freePlayFlowCoordinator as PartyFreePlayFlowCoordinator).didFinishEvent += OnFreePlayFlowCoordinatorFinished;

                if (!SongBrowserTweaks.ModLoaded)
                {
                    PrepareLevelPackSelectedEvent();
                    StartCoroutine(UIUtilities.DelayedAction(SelectSavedLevelPack));
                }
                else if (!SongBrowserTweaks.Initialized)
                {
                    StartCoroutine(GetSongBrowserButtons());
                }
            }
            else if (mode == FreePlayMode.Campaign)
            {
                _freePlayFlowCoordinator = FindObjectOfType <CampaignFlowCoordinator>();
                (_freePlayFlowCoordinator as CampaignFlowCoordinator).didFinishEvent += OnFreePlayFlowCoordinatorFinished;
            }

            SongBrowserTweaks.OnModeSelection();
        }