This commit is contained in:
shenjianxing 2025-04-03 10:49:16 +08:00
parent 1785664947
commit f5eef93a8e
2 changed files with 49 additions and 37 deletions

View File

@ -56,6 +56,8 @@ namespace ZXK.LouDiXvMuNiu
}
}
private void OnDestroy()
{
try
{
var zStylus = UIRoot.Instance.vrRoot.transform.Find("ZStylus").GetComponent<ZStylus>();
zStylus.OnObjectEntered.RemoveListener(VROnEnter);
@ -66,6 +68,11 @@ namespace ZXK.LouDiXvMuNiu
zMouse.OnObjectExited.RemoveListener(VROnExit);
zMouse.OnClick.RemoveListener(VROnClick);
}
catch (Exception)
{
}
}
#endif
private void OnMouseOver()
{

View File

@ -110,6 +110,9 @@ namespace ZXK.LouDiXvMuNiu
#if VR
private void VROnClick(ZPointer arg0, int arg1, GameObject arg2)
{
if (arg2.layer != LayerMask.NameToLayer("UI"))
{
NiuData curdata = GameManager.Instance._DataNiuHandler.CurNiuHandler.Value;
if (_CurSceneStep.TaskType.Equals(ConstCtrl.TASKTYPE_Anim))
@ -150,6 +153,8 @@ namespace ZXK.LouDiXvMuNiu
}
}
}
GameObject enterObj;