Example #1
0
        private void OnMenuSceneLoadedFresh()
        {
            // setup settings ui
            BSMLSettings.instance.AddSettingsMenu("SRM", "SongRequestManager.Views.SongRequestManagerSettings.bsml", SongRequestManagerSettings.instance);

            // main load point
            RequestBot.OnLoad();
            RequestBotConfig.Save(true);
        }
Example #2
0
        private void OnMenuSceneLoadedFresh()
        {
            try
            {
                Settings.OnLoad();
            }
            catch (Exception ex)
            {
                Plugin.Log($"{ex}");
            }

            RequestBot.OnLoad();
            RequestBotConfig.Save(true);
        }
        private void OnLateMenuSceneLoadedFresh(ScenesTransitionSetupDataSO scenesTransitionSetupData)
        {
            // setup settings ui
            BSMLSettings.instance.AddSettingsMenu("SRM", "SongRequestManager.Views.SongRequestManagerSettings.bsml", SongRequestManagerSettings.instance);

            var onlinePlayButton    = Resources.FindObjectsOfTypeAll <Button>().First(x => x.name == "OnlineButton");
            var soloFreePlayButton  = Resources.FindObjectsOfTypeAll <Button>().First(x => x.name == "SoloButton");
            var partyFreePlayButton = Resources.FindObjectsOfTypeAll <Button>().First(x => x.name == "PartyButton");
            var campaignButton      = Resources.FindObjectsOfTypeAll <Button>().First(x => x.name == "CampaignButton");

            onlinePlayButton.onClick.AddListener(() => { gameMode = GameMode.Online; });
            soloFreePlayButton.onClick.AddListener(() => { gameMode = GameMode.Solo; });
            partyFreePlayButton.onClick.AddListener(() => { gameMode = GameMode.Solo; });
            campaignButton.onClick.AddListener(() => { gameMode = GameMode.Solo; });

            // main load point
            RequestBot.OnLoad();
            RequestBotConfig.Save(true);
        }