public bool IsShow() { NxrReticle mNxrReticle = gameObject.GetComponent <NxrReticle>(); if (mNxrReticle != null) { return(mNxrReticle.IsShowing()); } return(true); }
public void OnGazeTrigger() { handleShutDownBox(); //清除原点选中效果 NxrReticle mNxrReticle = NxrViewer.Instance.GetNxrReticle(); if (mNxrReticle) { mNxrReticle.OnGazeExit(null, null); } }
public void OnGazeTrigger() { // Debug.Log("Trigger:" + gameObject.name); handleRemindBox(); //清除原点选中效果 NxrReticle mNxrReticle = NxrViewer.Instance.GetNxrReticle(); if (mNxrReticle != null) { mNxrReticle.OnGazeExit(null, null); } }
/// <summary> /// FadeOut /// </summary> /// <param name="remindbox"></param> public void FadeOut(GameObject remindbox) { if (remindbox != null) { Image[] contents = remindbox.GetComponentsInChildren <Image>(); foreach (Image child in contents) { child.color = new Color(255, 255, 255, child.color.a - 0.01f); } Text[] context = remindbox.GetComponentsInChildren <Text>(); foreach (Text child in context) { child.color = new Color(255, 255, 255, child.color.a - 0.01f); } MeshRenderer[] meshRenderer = remindbox.GetComponentsInChildren <MeshRenderer>(); foreach (MeshRenderer mr in meshRenderer) { mr.material.color = new Color(mr.material.color.r, mr.material.color.g, mr.material.color.b, mr.material.color.a - 0.01f); } if (context[0].color.a <= 0) { ReleaseDestory(); time = 0; //清除原点选中效果 NxrReticle mNxrReticle = NxrViewer.Instance.GetNxrReticle(); if (mNxrReticle != null) { mNxrReticle.OnGazeExit(null, null); } } } }