123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- using System.Collections;
- using System.Collections.Generic;
- using TMPro;
- using UnityEngine;
- public class ShowInfoTipManager : MonoSingleton<ShowInfoTipManager>
- {
- public GameObject go;
- public TextMeshProUGUI text;
- public void showTip(string msg,bool isHead=true)
- {
- if(!isHead)
- {
- if (WindowsManager.Instance.tipInfoGameObject != null && GSXR_Transform.position != null)
- {
- WindowsManager.Instance.tipInfoGameObject.transform.parent = GSXR_Transform;
- WindowsManager.Instance.tipInfoGameObject.transform.position = GSXR_Transform.position;
- WindowsManager.Instance.tipInfoGameObject.transform.LookAt(OpenXRCamera.Instance.head);
- }
- }
- else
- {
- if (WindowsManager.Instance.tipInfoGameObject != null && GSXR_Transform.position != null)
- {
- WindowsManager.Instance.tipInfoGameObject.transform.parent = OpenXRCamera.Instance.head;
- WindowsManager.Instance.tipInfoGameObject.transform.localPosition = new Vector3(0, 0, 1.5f);
- WindowsManager.Instance.tipInfoGameObject.transform.localEulerAngles = new Vector3(0,180,0);
-
- }
- }
- go.gameObject.SetActive(true);
- text.text = msg;
- }
-
-
-
-
- public static Transform GSXR_Transform
- {
- get
- {
- if (API_GSXR_Module_InputSystem_Head.GSXR_Head != null)
- {
- return API_GSXR_Module_InputSystem_Head.GSXR_Get_HeadCursor.transform;
- }
- else if (API_GSXR_Module_InputSystem_BT3Dof.GSXR_BTRight != null)
- {
- return API_GSXR_Module_InputSystem_BT3Dof.GSXR_Get_BTCursor(API_GSXR_Module_InputSystem_BT3Dof.BTType.Right).transform;
- }
- else if (API_GSXR_Module_InputSystem_BT3Dof.GSXR_BTLeft != null)
- {
- return API_GSXR_Module_InputSystem_BT3Dof.GSXR_Get_BTCursor(API_GSXR_Module_InputSystem_BT3Dof.BTType.Left).transform;
- }
- else if (API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight != null)
- {
- return API_GSXR_Module_InputSystem_GGT26Dof.GSXR_Get_GGTCursor(API_GSXR_Module_InputSystem_GGT26Dof.GGestureType.Right).transform;
- }
- else if (API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTLeft != null)
- {
- return API_GSXR_Module_InputSystem_GGT26Dof.GSXR_Get_GGTCursor(API_GSXR_Module_InputSystem_GGT26Dof.GGestureType.Left).transform;
- }
- else if (API_GSXR_Module_InputSystem_KS.GSXR_KSRight != null)
- {
- return API_GSXR_Module_InputSystem_KS.GSXR_Get_KSCursor(API_GSXR_Module_InputSystem_KS.GCType.Right).transform;
- }
- else if (API_GSXR_Module_InputSystem_KS.GSXR_KSLeft != null)
- {
- return API_GSXR_Module_InputSystem_KS.GSXR_Get_KSCursor(API_GSXR_Module_InputSystem_KS.GCType.Left).transform;
- }
- return null;
- }
- }
- public void closeTip()
- {
- go.gameObject.SetActive(false);
- }
- }
|