Exemple #1
0
        private void Start()
        {
            mixer = PrefabHolder.MainMixer();

            mixer.GetFloat("Volume", out volume);
            mixer.GetFloat("PlayerVolume", out playerVolume);
            mixer.GetFloat("AmbienceVolume", out ambienceVolume);
            mixer.GetFloat("StepsVolume", out stepsVolume);
            mixer.GetFloat("ObjectsVolume", out objectsVolume);
            mixer.GetFloat("EnemiesVolume", out enemiesVolume);
        }
Exemple #2
0
        void Start()
        {
            userData = GlobalMethods.LoadUserDataFromFile();

            fader = GetComponent <FaderEffect>();
            fader.FadeIn(Color.black, 3);

            //resDropdown
            resolutions = Screen.resolutions;
            resDropdown.ClearOptions();
            List <string> options   = new List <string>();
            int           myResIndx = 0;

            foreach (Resolution r in resolutions)
            {
                if (r.Equals(Screen.currentResolution))
                {
                    myResIndx = options.Count;
                }

                options.Add(r.width + " x " + r.height);
            }
            resDropdown.AddOptions(options);
            resDropdown.value = myResIndx;
            resDropdown.RefreshShownValue();

            //continue
            CheckIfShouldDisplayContinue();



            //LevelSelection
            FindAviableLevels();
            DisplayAviableLevles();


            //cursor
            Cursor.visible = true;
            //mixer bugs

            PrefabHolder.MainMixer().ClearFloat("MasterLowPass");
            PrefabHolder.MainMixer().ClearFloat("MasterPitch");
            PrefabHolder.MainMixer().ClearFloat("MasterEcho");
        }
Exemple #3
0
 //Audio
 public void SetVolume(float volume)
 {
     PrefabHolder.MainMixer().SetFloat("Volume", volume);
     volumeText.GetComponent <Text>().text = (int)((volume + 80) * (1 / 0.8)) + "%";
 }