123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using System;
- using UnityEngine;
- using UnityEngine.EventSystems;
- public class BaseInput2 : BaseInput
- {
- public override bool GetMouseButtonDown(int button)
- {
- return NInput.GetMouseButtonDown(button);
- }
- public override bool GetMouseButtonUp(int button)
- {
- return NInput.GetMouseButtonUp(button);
- }
- public override bool GetMouseButton(int button)
- {
- return NInput.GetMouseButton(button);
- }
- public override Vector2 mousePosition
- {
- get
- {
- if (GameMain.Instance != null && GameMain.Instance.OvrMgr != null && GameMain.Instance.OvrMgr.SystemUICamera)
- {
- return GameMain.Instance.OvrMgr.SystemUICamera.GetOvrVirtualMouseCurrentSidePos();
- }
- return Input.mousePosition;
- }
- }
- public override Vector2 mouseScrollDelta
- {
- get
- {
- return new Vector2(0f, NInput.GetAxis("Mouse ScrollWheel") * 10f);
- }
- }
- public override bool touchSupported
- {
- get
- {
- return false;
- }
- }
- public override int touchCount
- {
- get
- {
- return 0;
- }
- }
- public override float GetAxisRaw(string axisName)
- {
- if (axisName == "Vertical" || axisName == "Horizontal")
- {
- return 0f;
- }
- return NInput.GetAxis(axisName);
- }
- }
|