Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5.  
  6.  
  7.  
  8. public class OptionsManager : MonoBehaviour
  9. {
  10. public Toggle fullscreenToggle;
  11. GameOptions gameOptions;
  12.  
  13.  
  14. void OnEnable()
  15. {
  16. gameOptions = gameObject.AddComponent<GameOptions>();
  17.  
  18. fullscreenToggle.onValueChanged.AddListener(delegate { OnFullscreenToggle(); });
  19.  
  20. }
  21. public void OnFullscreenToggle()
  22. {
  23. gameOptions.fullscreen = Screen.fullScreen = fullscreenToggle.isOn;
  24. }
  25.  
  26. public void SaveOptions()
  27. {
  28.  
  29. }
  30.  
  31. public void LoadOptions()
  32. {
  33.  
  34. }
  35.  
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement