예제 #1
0
        /// <summary>
        /// ModuleDestroy ===================================
        /// </summary>



        public void AddModule(ISCModule Module, bool isEffectGameObject = true, SCModulePriority priority = SCModulePriority.Middle)
        {
            if (Module == null)
            {
                return;
            }

            Module.FatherModule = this;
            Module.ModuleInit(isEffectGameObject, priority);

            DebugMy.Log("[HashCode: " + GetHashCode() + "] " + "Module '" + Module.GetType() + "' [HashCode: " + Module.GetHashCode() + "] Add To Module '" + GetType(), this);
            lock (subModuleList) {
                subModuleList.Add(Module);
            }
        }
예제 #2
0
        /// <summary>
        /// Module 初始化 ===================================
        /// </summary>
        public void ModuleInit(bool isEffectGameObject = true, SCModulePriority priority = SCModulePriority.Middle)
        {
            if (IsModuleInit)
            {
                DebugMy.LogError("ModuleInit Had Invoke", this);
                return;
            }

            IsModuleInit = true;
            ModuleName   = GetType().ToString();
            IsMono       = false;

            IsEffectGameObject = isEffectGameObject;
            Priority           = priority;

            OnSCAwake();
        }