コード例 #1
0
        public void SetActiveButton(bl_AttachButton t)
        {
            if (t == null)
            {
                if (ActiveButton != null)
                {
                    ActiveButton.Active(false);
                    ActiveButton = null;
                }
                return;
            }

            if (ActiveButton != null)
            {
                ActiveButton.Active(false);
            }

            ActiveButton = t;
            ActiveButton.Active(true);
        }
コード例 #2
0
ファイル: bl_Customizer.cs プロジェクト: cnshouse/FPS_HEXEN2
        /// <summary>
        ///
        /// </summary>
        void ShowTextButton()
        {
            if (Customize)
            {
                Ray        ray = m_Camera.ScreenPointToRay(Input.mousePosition);
                RaycastHit hit;

                if (Physics.Raycast(ray, out hit, 1000))
                {
                    bl_AttachButton atb = hit.transform.GetComponent <bl_AttachButton>();
                    if (atb != null && atb != Button.ActiveButton)
                    {
                        Button.SetActiveButton(atb);
                    }
                }
                else
                {
                    Button.SetActiveButton(null);
                }
            }
        }