Beispiel #1
0
        private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1)
        {
            if (arg0.name == "Menu")
            {
                SoundEffectUI.OnLoad();

                SoundEffect._dist    = ModPrefs.GetBool(SoundEffectPlugin.PluginName, "Distortion", true, false);
                SoundEffect._distLen = ModPrefs.GetFloat(SoundEffectPlugin.PluginName, "DistortionLength", 0.15f, false);
                SoundEffect._miss    = ModPrefs.GetBool(SoundEffectPlugin.PluginName, "Miss", true, false);
                SoundEffect._missVol = ModPrefs.GetFloat(SoundEffectPlugin.PluginName, "MissVolume", 0.75f, false);
                SoundEffect._bomb    = ModPrefs.GetBool(SoundEffectPlugin.PluginName, "Bomb", true, false);
                SoundEffect._bombVol = ModPrefs.GetFloat(SoundEffectPlugin.PluginName, "BombVolume", 0.75f, false);
                SoundEffect._hit     = ModPrefs.GetBool(SoundEffectPlugin.PluginName, "Hit", true, false);
                SoundEffect._hitVol  = ModPrefs.GetFloat(SoundEffectPlugin.PluginName, "HitVolume", 0.75f, false);
                SoundEffect._bad     = ModPrefs.GetBool(SoundEffectPlugin.PluginName, "BadHit", true, false);
                SoundEffect._badVol  = ModPrefs.GetFloat(SoundEffectPlugin.PluginName, "BadHitVolume", 0.75f, false);
                SoundEffect._fail    = ModPrefs.GetBool(SoundEffectPlugin.PluginName, "Fail", true, false);
                SoundEffect._failVol = ModPrefs.GetFloat(SoundEffectPlugin.PluginName, "FailVolume", 0.75f, false);
            }
        }
Beispiel #2
0
        private void Awake()
        {
            _instance = this;
            foreach (Sprite sprite in Resources.FindObjectsOfTypeAll <Sprite>())
            {
                icons.Add(sprite);
            }
            try
            {
                _buttonInstance         = Resources.FindObjectsOfTypeAll <Button>().First(x => (x.name == "QuitButton"));
                _backButtonInstance     = Resources.FindObjectsOfTypeAll <Button>().First(x => (x.name == "BackArrowButton"));
                _mainMenuViewController = Resources.FindObjectsOfTypeAll <MainMenuViewController>().First();
                _mainMenuRectTransform  = _buttonInstance.transform.parent as RectTransform;
            }
            catch (Exception e)
            {
                Console.WriteLine("EXCEPTION ON AWAKE(TRY FIND BUTTONS): " + e);
            }

            //CreateSoundEffectButton();

            CreateSoundEffectSettingsUI();
        }