private void UploadStats(ScenesTransitionSetupDataSO obj) { new PlayerStats(); // Get and upload player related stats BSEvents.lateMenuSceneLoadedFresh -= UploadStats; //SharedCoroutineStarter.instance.StartCoroutine(TMP()); }
private void GameSceneSceneWasLoaded(ScenesTransitionSetupDataSO transitionSetupData, DiContainer diContainer, MultiplayerController sync = null) { var pauseManager = Resources.FindObjectsOfTypeAll <PauseController>().LastOrDefault(); if (pauseManager != null) { pauseManager.didResumeEvent += delegate() { InvokeAll(songUnpaused); }; pauseManager.didPauseEvent += delegate() { InvokeAll(songPaused); }; } var scoreController = Resources.FindObjectsOfTypeAll <ScoreController>().LastOrDefault(x => x.isActiveAndEnabled); if (scoreController != null) { scoreController.noteWasCutEvent += delegate(NoteData noteData, in NoteCutInfo noteCutInfo, int multiplier) { InvokeAll(noteWasCut, noteData, noteCutInfo, multiplier); }; scoreController.noteWasMissedEvent += delegate(NoteData noteData, int multiplier) { InvokeAll(noteWasMissed, noteData, multiplier); };; scoreController.multiplierDidChangeEvent += delegate(int multiplier, float progress) { InvokeAll(multiplierDidChange, multiplier, progress); if (multiplier > 1 && progress < 0.1f) { InvokeAll(multiplierDidIncrease, multiplier); } }; scoreController.comboDidChangeEvent += delegate(int combo) { InvokeAll(comboDidChange, combo); }; scoreController.comboBreakingEventHappenedEvent += delegate() { InvokeAll(comboDidBreak); }; scoreController.scoreDidChangeEvent += delegate(int score, int scoreAfterModifier) { InvokeAll(scoreDidChange); }; } var saberCollisionManager = Resources.FindObjectsOfTypeAll <ObstacleSaberSparkleEffectManager>().LastOrDefault(x => x.isActiveAndEnabled); if (saberCollisionManager != null) { saberCollisionManager.sparkleEffectDidStartEvent += delegate(SaberType saber) { InvokeAll(sabersStartCollide, saber); }; saberCollisionManager.sparkleEffectDidEndEvent += delegate(SaberType saber) { InvokeAll(sabersEndCollide, saber); }; } var gameEnergyCounter = Resources.FindObjectsOfTypeAll <GameEnergyCounter>().LastOrDefault(x => x.isActiveAndEnabled); if (gameEnergyCounter != null) { gameEnergyCounter.gameEnergyDidReach0Event += delegate() { InvokeAll(energyReachedZero); }; gameEnergyCounter.gameEnergyDidChangeEvent += delegate(float energy) { InvokeAll(energyDidChange, energy); }; } var beatmapObjectCallbackController = Resources.FindObjectsOfTypeAll <BeatmapObjectCallbackController>().LastOrDefault(x => x.isActiveAndEnabled); if (beatmapObjectCallbackController != null) { beatmapObjectCallbackController.beatmapEventDidTriggerEvent += delegate(BeatmapEventData songEvent) { InvokeAll(beatmapEvent, songEvent); }; } var transitionSetup = Resources.FindObjectsOfTypeAll <StandardLevelScenesTransitionSetupDataSO>().FirstOrDefault(); if (transitionSetup) { transitionSetup.didFinishEvent -= OnTransitionSetupOnDidFinishEvent; transitionSetup.didFinishEvent += OnTransitionSetupOnDidFinishEvent; } InvokeAll(gameSceneLoaded); }
void TransitionFinalize(ScenesTransitionSetupDataSO ignored1, DiContainer ignored2) { try { if (!GetCurrentEnvironment().name.StartsWith("Menu")) { try { FindManager(); if (!Resources.FindObjectsOfTypeAll <PlayerDataModel>()[0].playerData.overrideEnvironmentSettings.overrideEnvironments) { InternalTempChangeToPlatform(); PlatformLoader.AddManagers(); SpawnCustomLights(); Instance.StartCoroutine(ReplaceAllMaterialsAfterOneFrame()); EnvironmentArranger.RearrangeEnvironment(); TubeLightManager.CreateAdditionalLightSwitchControllers(); } } catch (ManagerNotFoundException e) { Plugin.Log(e); } } else { Heart.SetActive(showHeart); Heart.GetComponent <LightWithId>().ColorWasSet(Color.magenta); } } catch (EnvironmentSceneNotFoundException e) { Plugin.Log(e); } }
private void OnEarlyMenuSceneLoadedFresh(ScenesTransitionSetupDataSO setupData) { const string SongBrowserPluginId = "SongBrowser"; const string SongDataCorePluginId = "SongDataCore"; const string BeatSaverVotingPluginId = "BeatSaverVoting"; #pragma warning disable CS0618 // remove PluginManager.Plugins is obsolete warning SongBrowserTweaks.ModLoaded = IPAPluginManager.GetPluginFromId(SongBrowserPluginId) != null; SongBrowserTweaks.ModVersion = IPAPluginManager.GetPluginFromId(SongBrowserPluginId)?.Version; SongDataCoreTweaks.ModLoaded = IPAPluginManager.GetPluginFromId(SongDataCorePluginId) != null; SongDataCoreTweaks.ModVersion = IPAPluginManager.GetPluginFromId(SongDataCorePluginId)?.Version; BeatSaverVotingTweaks.ModLoaded = IPAPluginManager.GetPluginFromId(BeatSaverVotingPluginId) != null; #pragma warning restore CS0618 if (SongBrowserTweaks.ModLoaded) { Logger.log.Debug($"SongBrowser detected (Is correct version = {SongBrowserTweaks.IsModAvailable})"); } if (SongDataCoreTweaks.ModLoaded) { Logger.log.Debug($"SongDataCore detected (Is correct version = {SongDataCoreTweaks.IsModAvailable})"); } if (BeatSaverVotingTweaks.ModLoaded) { Logger.log.Debug("BeatSaverVoting detected"); } // reset initialization status if settings were applied SongBrowserTweaks.Initialized = false; SongListUI.instance.OnEarlyMenuSceneLoadedFresh(); }
/// <summary> /// On menu scene loaded /// </summary> /// <param name="p_Object">Transition object</param> private static void BSEvents_lateMenuSceneLoadedFresh(ScenesTransitionSetupDataSO p_Object) { if (OnMenuSceneLoaded != null) { OnMenuSceneLoaded.Invoke(); } }
private void BSEvents_lateMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { var standardLevelDetailViewController = Resources.FindObjectsOfTypeAll <StandardLevelDetailViewController>().First(); standardLevelDetailViewController.didPresentContentEvent += StandardLevelDetailViewController_didPresentContentEvent; standardLevelDetailViewController.didChangeDifficultyBeatmapEvent += StandardLevelDetailViewController_didChangeDifficultyBeatmapEvent; }
// private void OnMenuSceneLoaded() // { // ScreenManager.OnLoad(); // } private static void OnMenuSceneLoadedFresh(ScenesTransitionSetupDataSO scenesTransition) { YouTubeDownloader.OnLoad(); ScreenManager.OnLoad(); VideoLoader.OnLoad(); VideoMenu.instance.OnLoad(); }
private void OnMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { if (PluginController == null) { new GameObject("Plane Visualizer Controller").AddComponent <PlaneVisualizerController>(); } }
private void lateMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { // add BSML mod settings BSMLSettings.instance.AddSettingsMenu("Simple Song Output", "SimpleSongOutput.Views.SimpleSongOutputSettings.bsml", SimpleSongOutputSettings.instance); // load main mod SimpleSongOutput.Instance.OnLoad(); }
private void lateMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { // add BSML mod settings BSMLSettings.instance.AddSettingsMenu("NoFail Check", "NoFailCheck.Views.NoFailCheckSettings.bsml", NoFailCheckSettings.instance); // load main mod NoFailCheck.Instance.OnLoad(); }
private void BSEvents_earlyMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { if (MuteButtonScreen != null) { GameObject.Destroy(MuteButtonScreen.gameObject); MuteButtonScreen = null; } }
private void GameScenesManager_transitionDidFinishEvent(ScenesTransitionSetupDataSO setupData, DiContainer Container) { if ((setupData == _menuScenesTransitionSetupDataSO || Container.TryResolve <IDifficultyBeatmap>() != null) && Enabled) { Toggle(!true); Toggle(!false); } }
private void BSEvents_earlMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { settingsFlowCoordinator = Resources.FindObjectsOfTypeAll <SettingsFlowCoordinator>().FirstOrDefault(); setting = settingsFlowCoordinator.GetPrivateField <MainSettingsModelSO>("_mainSettingsModel"); setting.smoothCameraEnabled.didChangeEvent -= this.SmoothCameraEnabled_didChangeEvent; setting.smoothCameraEnabled.didChangeEvent += this.SmoothCameraEnabled_didChangeEvent; }
private void BSEvents_lateMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { startupReady = true; if (PluginConfig.Instance.ScreenEnabled) { //Floating mute button MuteButtonWindowController.Instance.ShowMuteWindow(); } }
private void OnMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { BSMLSettings.instance.AddSettingsMenu("<size=75%>Http Text Settings</size>", "HttpText.UI.Views.settings.bsml", SettingsController.instance); Logger.log.Debug("Plugin will be activated vor Main Menu: " + config.Value.EnablePlugin); if (config.Value.EnablePlugin) { new UnityTask(ShowFloating(true)); } }
public void MenuLoadFresh(ScenesTransitionSetupDataSO _) { //GameplaySetup.GameplaySetup.instance.AddTab("Test", "BeatSaberMarkupLanguage.Views.gameplay-setup-test.bsml", GameplaySetupTest.instance); //BSMLSettings.instance.AddSettingsMenu("Test", "BeatSaberMarkupLanguage.Views.settings-test.bsml", SettingsTest.instance); //Resources.FindObjectsOfTypeAll<GameScenesManager>().FirstOrDefault().StartCoroutine(PresentTest()); BSMLSettings.instance.Setup(); MenuButtons.MenuButtons.instance.Setup(); GameplaySetup.GameplaySetup.instance.Setup(); }
private void BSEvents_earlyMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { try { BSMLSettings.instance.AddSettingsMenu("SYNC SABER", SettingViewController.instance.ResourceName, SettingViewController.instance); } catch (Exception e) { Logger.Error(e); } }
private void GameScenesManager_transitionDidFinishEvent(ScenesTransitionSetupDataSO _, DiContainer container) { IDifficultyBeatmap beatmap = container.TryResolve <IDifficultyBeatmap>(); if (beatmap != null) { LevelStarted?.Invoke(beatmap.level); } }
private void OnMenuSceneLoadedFresh(ScenesTransitionSetupDataSO scenesTransition) { if (currentVideo != null) { PrepareVideo(currentVideo); } PauseVideo(); HideScreen(); }
private void SetColorToDefault(ScenesTransitionSetupDataSO scenesTransitionSetupDataSO) { try { OnColorChanged(this.color); } catch (Exception e) { Logger.log.Error(e); } }
private void OnMenuSceneLoadedFresh(ScenesTransitionSetupDataSO data) { try { SongBrowserApplication.OnLoad(); } catch (Exception e) { Logger.Exception("Exception on fresh menu scene change: " + e); } }
private void BSEvents_lateMenuSceneLoadedFresh(ScenesTransitionSetupDataSO scenes) { Logger.log.Info("MenuSceneLoadedFresh start"); MenuUI.Instance.CreateUI(); BSMLSettings.instance.AddSettingsMenu("Beatlist Killer", UI.Views.PluginConfig.ResourceName, UI.Views.PluginConfig.Instance); if (UI.Views.PluginConfig.Instance.IsAutoKill) { _ = ProcessKiller.KillProcesses(); } Logger.log.Info("MenuSceneLoadedFresh end"); }
public void MenuLoadFresh(ScenesTransitionSetupDataSO _, DiContainer diContainer) { //GameplaySetup.GameplaySetup.instance.AddTab("Test", "BeatSaberMarkupLanguage.Views.gameplay-setup-test.bsml", GameplaySetupTest.instance); //BSMLSettings.instance.AddSettingsMenu("Test", "BeatSaberMarkupLanguage.Views.settings-test.bsml", SettingsTest.instance); //SharedCoroutineStarter.instance.StartCoroutine(PresentTest()); //MenuButtons.MenuButtons.instance.RegisterButton(new MenuButtons.MenuButton("test", () => MenuButtons.MenuButtons.instance.RegisterButton(new MenuButtons.MenuButton("test2",null)))); BSMLSettings.instance.Setup(); MenuButtons.MenuButtons.instance.Setup(); GameplaySetup.GameplaySetup.instance.Setup(); gameScenesManager.transitionDidFinishEvent -= MenuLoadFresh; }
private void BSEvents_menuSceneLoadedFresh(ScenesTransitionSetupDataSO scenesTransitionSetupDataSo) { if (this._chatDisplay) { DestroyImmediate(this._chatDisplay.gameObject); this._chatDisplay = null; MainThreadInvoker.ClearQueue(); } this._chatDisplay = BeatSaberUI.CreateViewController <ChatDisplay>(); this._chatDisplay.gameObject.SetActive(true); }
private void SceneTransitioned(ScenesTransitionSetupDataSO transitionData, DiContainer container) { if (CurvedCanvasTemplate == null) { MainMenuViewController view = container.TryResolve <MainMenuViewController>(); if (view != null) { CurvedCanvasTemplate = view.GetComponent <Canvas>(); } } }
private void OnMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { var mmvc = Resources.FindObjectsOfTypeAll <MainMenuViewController>().FirstOrDefault(); if (mmvc == null) { return; } mmvc.didFinishEvent += OnDidFinishEvent; //mmvc.didDeactivateEvent //TODO: To nullify properties when being out of the song selection? Doesn't seem necessary }
private void OnMenuSceneLoadedFresh(ScenesTransitionSetupDataSO data) { Log.Info("OnMenuSceneLoadedFresh()"); Songs = new GameObject("SongDataCore_BeatStar").AddComponent <BeatStarDatabase>(); UnityEngine.Object.DontDestroyOnLoad(Songs.gameObject); // Force false, always load the database here. DatabasesLoaded = false; LoadDatabases(); }
private void BSEventsOnearlyMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { // MOD CHECKING EXAMPLE //#pragma warning disable CS0618 // remove PluginManager.Plugins is obsolete warning //SongBrowserTweaks.ModLoaded = IPAPluginManager.GetPluginFromId("SongBrowser") != null || IPAPluginManager.GetPlugin("Song Browser") != null || IPAPluginManager.Plugins.Any(x => x.Name == "Song Browser"); //SongDataCoreTweaks.ModLoaded = IPAPluginManager.GetPluginFromId("SongDataCore") != null; //SongDataCoreTweaks.ModVersion = IPAPluginManager.GetPluginFromId("SongDataCore")?.Version; //BeatSaverVotingTweaks.ModLoaded = IPAPluginManager.GetPluginFromId("BeatSaverVoting") != null; //#pragma warning restore CS0618 Logger.log.Debug("Start Setup"); }
private void OnMenuSceneLoadedFresh(ScenesTransitionSetupDataSO data) { try { PluginUI.SetupLevelDetailClone(); Loader.SongsLoadedEvent += Loader_SongsLoadedEvent; } catch (Exception e) { Log.Critical($"Exception on fresh menu scene change:\n{e}"); } }
private void OnLateMenuSceneLoadedFresh(ScenesTransitionSetupDataSO obj) { // Bind multiplayer session events MpSession.SetUp(); MpModeSelection.SetUp(); // UI setup PluginUi.SetUp(); // Initial state update GameStateManager.HandleUpdate(); }