예제 #1
0
        public void OnApplicationStart()
        {
            if (_init)
            {
                return;
            }
            _init    = true;
            instance = this;

            UIHelper.OnLoad();
            RandomSongManager.OnLoad();
        }
예제 #2
0
        public void Awake()
        {
            if (Instance == null)
            {
                Instance = this;
                SceneManager.activeSceneChanged += SceneManagerOnActiveSceneChanged;
                DontDestroyOnLoad(gameObject);
                Console.WriteLine("Random Song started.");

                pastSongs = new Queue <IStandardLevel>(20);

                excludeStandard = ModPrefs.GetBool(Plugin.PluginName, excludeStandardSetting, false, true);
                autoPlay        = ModPrefs.GetBool(Plugin.PluginName, autoPlaySetting, true, true);
                minDiff         = (LevelDifficulty)ModPrefs.GetInt(Plugin.PluginName, minDiffSetting, (int)LevelDifficulty.Easy, true);
                maxDiff         = (LevelDifficulty)ModPrefs.GetInt(Plugin.PluginName, maxDiffSetting, (int)LevelDifficulty.ExpertPlus, true);
            }
            else
            {
                Destroy(this);
            }
        }