适配VR
This commit is contained in:
parent
1785664947
commit
f5eef93a8e
@ -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()
|
||||
{
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user