// Update options control elements
    private void updateOptionsControlElements()
    {
        // Set the value of the motion blur toggle to be the same as the saved options data
        motionBlurToggle.isOn = SaveGameManager.getSavedMotionBlurToggle();

        // Set the value of the sliders to be the same as the saved options data
        mouseSensitivitySlider.value = SaveGameManager.getSavedMouseSensitivity();
        audioVolumeSlider.value      = SaveGameManager.getSavedAudioVolumeValue() * 10;


        // Show the values of the sliders on their respective labels
        mouseSensitivityValueText.text = Math.Round(mouseSensitivitySlider.value, 2).ToString();
        audioVolumeValueText.text      = Math.Round(audioVolumeSlider.value, 2).ToString();
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        // Set the high score
        setHighScore(SaveGameManager.getSavedHighScore());

        // Set the look sensitivity to be the same as the saved mouse sensitivity
        lookSensitivity = SaveGameManager.getSavedMouseSensitivity();
        print(lookSensitivity);

        print("Motion Blur On: " + SaveGameManager.getSavedMotionBlurToggle());

        // Set the volume of the audio listener based on the save data
        AudioListener.volume = SaveGameManager.getSavedAudioVolumeValue();
        print("Volume: " + AudioListener.volume);
    }
    // Transition to welcome screen
    private void transitionToWelcomeScreen()
    {
        print(mouseSensitivitySlider.value);

        // Set the saved data values
        SaveGameManager.setSavedMouseSensitivity(mouseSensitivitySlider.value);
        SaveGameManager.setSavedMotionBlurToggle(motionBlurToggle.isOn);
        SaveGameManager.setSavedAudioVolumeValue(audioVolumeSlider.value * 0.1f);

        print(SaveGameManager.getSavedMouseSensitivity());
        print("Volume: " + SaveGameManager.getSavedAudioVolumeValue());

        // Hide this HUD
        hideHUD();

        // Show the welcome HUD
        welcomeHUDRef.showHUD();
    }