Exemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     sensitivity = 50f;
     if (PlayerPrefs.HasKey("lookSensity"))
     {
         sensitivity = PlayerPrefs.GetFloat("lookSensity");
     }
     sliderLS.value = sensitivity;
     sliderLS.onValueChanged.AddListener(delegate { ChangeSensitivity(); });
     if (playerLook)
     {
         playerLook.SetSensitivity(sensitivity);
         valueSensitivity.text = playerLook.GetSensitivity().ToString();
     }
 }