BaseInput2.cs 921 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System;
  2. using UnityEngine;
  3. using UnityEngine.EventSystems;
  4. public class BaseInput2 : BaseInput
  5. {
  6. public override bool GetMouseButtonDown(int button)
  7. {
  8. return NInput.GetMouseButtonDown(button);
  9. }
  10. public override bool GetMouseButtonUp(int button)
  11. {
  12. return NInput.GetMouseButtonUp(button);
  13. }
  14. public override bool GetMouseButton(int button)
  15. {
  16. return NInput.GetMouseButton(button);
  17. }
  18. public override Vector2 mousePosition
  19. {
  20. get
  21. {
  22. return GameMain.Instance.OvrMgr.SystemUICamera.GetOvrVirtualMouseCurrentSidePos();
  23. }
  24. }
  25. public override Vector2 mouseScrollDelta
  26. {
  27. get
  28. {
  29. return new Vector2(0f, NInput.GetAxis("Mouse ScrollWheel") * 10f);
  30. }
  31. }
  32. public override bool touchSupported
  33. {
  34. get
  35. {
  36. return false;
  37. }
  38. }
  39. public override int touchCount
  40. {
  41. get
  42. {
  43. return 0;
  44. }
  45. }
  46. public override float GetAxisRaw(string axisName)
  47. {
  48. return NInput.GetAxis(axisName);
  49. }
  50. }