Пример #1
0
    public static SceneEditorMenuMgr Instance()
    {
        if (s_Instance == null)
        {
            s_Instance = new SceneEditorMenuMgr();
        }

        return(s_Instance);
    }
Пример #2
0
    public static void ShowMenu()
    {
        if (Event.current != null && Event.current.button == 1)
        {
            m_CurrenType = Event.current.type;

            if (s_LasType == EventType.MouseDown && m_CurrenType == EventType.MouseUp)
            {
                SceneEditorMenuMgr.Instance().Show();
                Event.current.Use();
            }
            else if (m_CurrenType != EventType.Layout && m_CurrenType != EventType.Repaint)
            {
                s_LasType = m_CurrenType;
            }
        }
    }
Пример #3
0
 protected override void DestoryEvent()
 {
     s_Instance = null;
 }