public void SetGraphicsSettings()
    {
        Screen.SetResolution(width[resolutionDropdown.value], height[resolutionDropdown.value], fullscreenToggle.isOn);
        QualitySettings.SetQualityLevel(qualityDropdown.value);


        SaveLoadSystem.SaveOptions(new OptionsData(resolutionDropdown.value, qualityDropdown.value, fullscreenToggle.isOn, music.value, ambience.value, effects.value));
    }
    public void SetAudioSettings()
    {
        audioControl.mixer[0].SetFloat("Volume", music.value);
        audioControl.mixer[1].SetFloat("Volume", ambience.value);
        audioControl.mixer[2].SetFloat("Volume", effects.value);


        SaveLoadSystem.SaveOptions(new OptionsData(resolutionDropdown.value, qualityDropdown.value, fullscreenToggle.isOn, music.value, ambience.value, effects.value));
    }
Beispiel #3
0
    public void SaveOptions()
    {
        GameOptions newGameOptions = new GameOptions();

        //float musicVolume;
        //main.audioControl.mixer [0].GetFloat ("Volume",out musicVolume);
        newGameOptions.musicVolume = musicSlider.value;

        //float effectVolume;
        //main.audioControl.mixer [1].GetFloat ("Volume",out effectVolume);
        newGameOptions.effectVolume = soundSlider.value;

        newGameOptions.resolution = resolutionDropdown.value;
        newGameOptions.quality    = qualityDropdown.value;
        newGameOptions.fullscreen = fullscreenToggle.isOn;

        newGameOptions.holdToMove           = holdToMove.isOn;
        newGameOptions.switchToSystemOnMove = switchToSystemOnMove.isOn;
        newGameOptions.cameraFollowShip     = cameraFollowShip.isOn;

        SaveLoadSystem.SaveOptions(newGameOptions);
    }