NGUI 事件屏蔽

public Camera m_UICamera;
public int m_Layer;

public bool IsUILayer()
{
       if(m_UICamera== null)
        {
            m_UICamera= UICamera.currentCamera;
        }

        if (uiCamera != null)
        {
            Ray ray = uiCamera.ScreenPointToRay(Input.mousePosition);

            if (Physics.Raycast(ray, Mathf.Infinity, m_Layer))
            {
                return true;
            }
        }

        return false; 
}

 

posted @ 2014-07-26 13:47  kadajEvo  阅读(300)  评论(0)    收藏  举报