private void OnLoadGuid()
        {
            if (!m_guidInit && !m_moduleStart)
            {
                ModuleMgr.Instance.AddModule <GuidNewModule>((byte)GameModuleTypes.GUID_MODULE, true);
                this.m_guidInit    = false;
                this.m_moduleStart = true;
            }

            if (m_guidInit)
            {
                Debug.Log("Guid has init ====");
                return;
            }
            if (this.IsFinish())
            {
                Debug.Log("Guid Complete ====");
                return;
            }
            EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_GUID);

            for (int i = 0; i < ConfGuidNew.array.Count; i++)
            {
                ConfGuidNew guid = ConfGuidNew.array[i];
                if (GetProgressByIndex(guid.groupId))
                {
                    continue;
                }
                GuidNewBase newBase = GuidNewFunctionFactory.Instance.CreateGuidById(guid.id);
                newBase.OnInitStart();
                m_Guid.Add(guid.id, newBase);
            }
            this.m_guidInit = true;
        }
        public GuidNewBase CreateGuidById(long guidID)
        {
            ConfGuidNew confGuid = ConfGuidNew.Get(guidID);

            if (confGuid == null)
            {
                return(null);
            }
            Type        guidType = guidTypes[(GuidEnum)confGuid.type];
            GuidNewBase baseGuid = Activator.CreateInstance(guidType) as GuidNewBase;

            baseGuid.SetGuidID(guidID);
            return(baseGuid);
        }
Exemple #3
0
 public void SetGuidBase(GuidNewBase guid)
 {
     this.m_guidBase = guid;
     CreateChildFunc();
 }