public void RemoveModule(ISCModule Module) { if (Module == null) { return; } DebugMy.Log("[HashCode: " + GetHashCode() + "] " + "Module '" + Module.GetType() + "' [HashCode: " + Module.GetHashCode() + "] Remove From Module '" + GetType(), this); lock (subModuleList) { subModuleList.Remove(Module); } Module.ModuleDestroy(); Module.FatherModule = null; }
/// <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); } }