123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- using System;
- using UnityEngine;
- using SC.InputSystem;
- using SC.InputSystem.InputDeviceHead;
- using SC.InputSystem.InputDeviceHandShank;
- using SC.InputSystem.InputDevice26DofGesture;
- public class API_InputSystem_Head {
-
-
-
-
-
- public static InputDeviceHead HeadDevice {
- get {
- if(InputSystem.Instant) {
- return InputSystem.Instant.Head;
- }
- return null;
- }
- }
-
-
-
-
- public static InputDeviceHeadPart Head {
- get {
- if(HeadDevice && HeadDevice.inputDeviceHeadPartList[0]) {
- return HeadDevice.inputDeviceHeadPartList[0].inputDataBase.isVaild ? HeadDevice.inputDeviceHeadPartList[0] : null;
- }
- return null;
- }
- }
-
-
-
-
- public static Vector3 HeadEulerAngles {
- get {
- if(Head) {
- return Head.inputDataHead.rotation;
- }
- return Vector3.zero;
- }
- }
-
-
-
-
- public static Vector3 HeadPosition {
- get {
- if(Head) {
- return Head.inputDataHead.position;
- }
- return Vector3.zero;
- }
- }
-
-
-
-
- public static SCPointEventData HeadPointerEventData {
- get {
- if(Head) {
- return Head.inputDataBase.pointerEventData;
- }
- return null;
- }
- }
-
-
-
-
- public static GameObject HeadHitTarget {
- get {
- if(HeadPointerEventData != null) {
- return HeadPointerEventData.target;
- }
- return null;
- }
- }
-
-
-
-
-
- public static RaycastHit HeadHitInfo {
- get{
- if(HeadPointerEventData != null) {
- return HeadPointerEventData.hitinfo;
- }
- return new RaycastHit();
- }
- }
-
-
-
-
- public static GameObject HeadDragTarget {
- get {
- if(HeadPointerEventData != null) {
- return HeadPointerEventData.dragTarget;
- }
- return null;
- }
- }
-
-
-
-
-
-
- public static bool IsHeadKeyDown(InputKeyCode inputKeyCode) {
- if(Head) {
- return Head.inputDataBase.GetKeyDown(inputKeyCode);
- }
- return false;
- }
-
-
-
-
-
-
- public static bool IsHeadKeyUp(InputKeyCode inputKeyCode) {
- if(Head) {
- return Head.inputDataBase.GetKeyUp(inputKeyCode);
- }
- return false;
- }
-
-
-
-
-
-
- public static InputKeyState HeadKeyState(InputKeyCode inputKeyCode) {
- if(Head) {
- return Head.inputDataBase.GetKeyState(inputKeyCode);
- }
- return InputKeyState.Null;
- }
-
-
-
-
-
-
- public static InputKeyState HeadKeyCurrentState(InputKeyCode inputKeyCode) {
- if(Head) {
- return Head.inputDataBase.GetKeyCurrentState(inputKeyCode);
- }
- return InputKeyState.Null;
- }
-
-
-
-
-
-
- public static void HeadAddKey(InputKeyCode inputKeyCode, InputKeyState inputKeyState) {
- if(Head) {
- Head.inputDataBase.InputDataAddKey(inputKeyCode, inputKeyState);
- }
- }
-
-
-
-
-
- public static void SetHeadRayCastDistance(float distance) {
- if(Head && distance > 0) {
- Head.inputDeviceTargetDetecterBase.MaxRaycastRange = distance;
- }
- }
-
-
-
-
-
- public static void SetHeadEndPointerDistance(float distance) {
- if(Head && distance > 0) {
- Head.inputDeviceTargetDetecterBase.MaxEndPointRange = distance;
- }
- }
-
-
-
-
- public static Focus GetHeadFocus {
- get {
- if(Head) {
- return Head.inputDeviceUIBase.model.lineIndicate.focus;
- }
- return null;
- }
- }
- }
|