CameraFVDebugGUI.cs 947 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using UnityEngine;
  3. public class CameraFVDebugGUI : DebugGuiBase
  4. {
  5. protected override string UIDebugButtonName
  6. {
  7. get
  8. {
  9. return "FV调节";
  10. }
  11. }
  12. public override void OnDebugGUI()
  13. {
  14. if (!this.InVisible)
  15. {
  16. return;
  17. }
  18. int width = Screen.width;
  19. int num = (width - 620) / 2;
  20. int num2 = 110;
  21. GUI.BeginGroup(new Rect((float)num, (float)num2, 620f, 220f));
  22. GUI.Box(new Rect(0f, 0f, 620f, 220f), "FV Settings");
  23. GUI.Label(new Rect(20f, 60f, 300f, 60f), string.Format("FV:({0})", SingletonMono<CameraController>.Instance.FieldOfView));
  24. SingletonMono<CameraController>.Instance.FieldOfView = GUI.HorizontalSlider(new Rect(240f, 70f, 400f, 60f), SingletonMono<CameraController>.Instance.FieldOfView, 10f, 60f);
  25. if (GUI.Button(new Rect(280f, 120f, 100f, 60f), "Close"))
  26. {
  27. this.InVisible = false;
  28. }
  29. GUI.EndGroup();
  30. }
  31. protected override void GUIStart()
  32. {
  33. }
  34. }