Exemplo n.º 1
0
        void Awake()
        {
            GameSettings preference = PreferencesService.LoadSettings();

            cameraAudioSource = main_camera.GetComponent <AudioSource>();
            playerAudioSource = this.gameObject.GetComponent <AudioSource>();
            Debug.Log(((float)preference.Volume / 100f));
            playerAudioSource.volume = ((float)preference.Volume / 100f);
            cameraAudioSource.volume = ((float)preference.Volume / 100f);
        }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        GameSettings gameSettings   = PreferencesService.LoadSettings();
        GameSettings updateSettings = new GameSettings();

        updateSettings.Lighting    = 70;
        updateSettings.Volume      = 70;
        updateSettings.FieldOfView = 70;
        PreferencesService.WriteSettings(updateSettings);
    }
Exemplo n.º 3
0
 private void Awake()
 {
     gameSettings = PreferencesService.LoadSettings();
 }