Пример #1
0
        void SetupModule(int newModuleIndex)
        {
            if (s_Instance == null)
            {
                return;
            }

            m_MainViewIMGUIElement.Clear();
            if (m_RegisteredModules.Count > newModuleIndex)
            {
                m_CurrentModuleIndex = newModuleIndex;
                if (m_CurrentModule != null)
                {
                    m_CurrentModule.OnModuleDeactivate();
                }

                m_CurrentModule = null;

                m_CurrentModule = m_RegisteredModules[newModuleIndex];

                m_CurrentModule.OnModuleActivate();
            }
            if (m_MainViewElement != null)
            {
                m_MainViewElement.Dirty(ChangeType.Repaint);
            }
            if (m_MainViewIMGUIElement != null)
            {
                m_MainViewIMGUIElement.Dirty(ChangeType.Repaint);
            }
        }