Example #1
0
        /// <summary>
        /// Remove a BaseUIModule form _DicModules
        /// </summary>
        /// <param name="moduleName">Module Name</param>
        public void UnRegister(BaseUIModule _UIModule)
        {
            if (null == _DicModules)
            {
                return;
            }
            Type _T = _UIModule.GetType();

            if (_DicModules.ContainsKey(_T.ToString()))
            {
                _DicModules.Remove(_T.ToString());
            }
            else
            {
                Debug.Log("The BaseUIModule is not register!!!");
            }
        }
Example #2
0
        /// <summary>
        /// Register a UIModule
        /// </summary>
        /// <param name="moduleName">Module Name</param>
        /// <param name="_UIModule">This is a Type Of BaseUIModule</param>
        public void Register(BaseUIModule _UIModule)
        {
            if (null == _DicModules)
            {
                return;
            }
            if (null == _UIModule)
            {
                Debug.Log("BaseUIModule is null ,This is not allow!!!");
                return;
            }
            Type _T = _UIModule.GetType();

            if (_DicModules.ContainsKey(_T.ToString()))
            {
                Debug.Log("BaseUIModule is already register !!!");
                return;
            }

            _DicModules.Add(_T.ToString(), _UIModule);
        }