/// <summary> /// Removes a system from World. /// </summary> /// <param name="system">System instance to remove.</param> public void RemoveSystem(BaseSystem system) { Type systemType = system.GetType(); #if DEBUG if (!HasSystem(systemType) || GetSystem(systemType) != system) { throw new SystemNotFoundException(); } #endif m_SystemsList.Remove(systemType); }
/// <summary> /// Add new System to World. /// </summary> /// <param name="system">New system.</param> /// <param name="created">Created flag.</param> public void AddSystem(BaseSystem system, out bool created) { #if DEBUG if (HasSystem(system.GetType())) { created = false; throw new SystemAlreadyExistsException(); } #endif system.Init(WorldRef); m_SystemsList.Add(system.GetType(), system); created = true; }
/// <summary> /// Add new System to World. /// </summary> /// <param name="system">New system.</param> public void AddSystem(BaseSystem system) { AddSystem(system, out bool created); }
/// <summary> /// Remove given System from World. /// </summary> /// <param name="system">Given System.</param> internal void RemoveSystem(BaseSystem system) { SystemsStorage.RemoveSystem(system.GetType()); }
/// <summary> /// Add given System to World. /// </summary> /// <param name="system">Given System</param> public void AddSystem(BaseSystem system) { SystemsStorage.AddSystem(system); }