Beispiel #1
0
    // Start is called before the first frame update
    private void Start()
    {
        controllerInput = GameObject.Find("EventSystem").GetComponent <ControllerInputDetection>();
        Save            = GameObject.Find("MainMenuCanvas").GetComponent <SaveData>();
        resolutions     = Screen.resolutions;

        /*if (musicSlider && sfxSlider != null)
         * {
         * musicSlider.value = PlayerPrefs.GetFloat("MusicVolume", 1f);
         * sfxSlider.value = PlayerPrefs.GetFloat("SFXVolume", 1f);
         * }*/

        // SetMusicVolume(PlayerPrefs.GetFloat("musicVol", 0));
        // SetSFXVolume(PlayerPrefs.GetFloat("sfxVol", 0));

        //musicSlider.value = PlayerPrefs.GetFloat("musicVol", 0);
        //sfxSlider.value = PlayerPrefs.GetFloat("sfxVol", 0);
        musicSlider.value = SoundManager.Instance.MusicVol;
        sfxSlider.value   = SoundManager.Instance.SoundVol;

        currentResolutionIndex = PlayerPrefs.GetInt(Resolution_Pref_Key, 0);

        //Set resolution Text to screens resolution on start up
        SetResolutionText(resolutions[currentResolutionIndex]);
    }
 private void SetEventSys()
 {
     controllerInput = GameObject.Find("EventSystem").GetComponent <ControllerInputDetection>();
 }
Beispiel #3
0
 private GameObject mainMenuBtn, optionsMenuBtn, quitBtn;             //buttons that will be used for controller interactions.
 private void Start()
 {
     controllerInput = GameObject.Find("EventSystem").GetComponent <ControllerInputDetection>();
     InitializeMenu();
     SoundManager.Instance.PlayMainTheme();
 }
Beispiel #4
0
    private GameObject mainMenuBtn, optionsMenuBtn, quitBtn;             //buttons that will be used for controller interactions.

    private void Start()
    {
        controllerInput = GameObject.Find("EventSystem").GetComponent <ControllerInputDetection>();
        InitializeMenu();
    }