コード例 #1
0
        public bool IsShow()
        {
            NxrReticle mNxrReticle = gameObject.GetComponent <NxrReticle>();

            if (mNxrReticle != null)
            {
                return(mNxrReticle.IsShowing());
            }
            return(true);
        }
コード例 #2
0
        public void OnGazeTrigger()
        {
            handleShutDownBox();
            //清除原点选中效果
            NxrReticle mNxrReticle = NxrViewer.Instance.GetNxrReticle();

            if (mNxrReticle)
            {
                mNxrReticle.OnGazeExit(null, null);
            }
        }
コード例 #3
0
        public void OnGazeTrigger()
        {
            // Debug.Log("Trigger:" + gameObject.name);
            handleRemindBox();
            //清除原点选中效果
            NxrReticle mNxrReticle = NxrViewer.Instance.GetNxrReticle();

            if (mNxrReticle != null)
            {
                mNxrReticle.OnGazeExit(null, null);
            }
        }
コード例 #4
0
        /// <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);
                    }
                }
            }
        }