public static void RemoveEntities(this IEntityCollection entityCollection, params IEntity[] entities) { for (var i = 0; i < entities.Length; i++) { entityCollection.RemoveEntity(entities[i].Id); } }
public static void RemoveEntities(this IEntityCollection entityCollection, IEnumerable <IEntity> entities) { foreach (var entity in entities) { entityCollection.RemoveEntity(entity.Id); } }
public static void RemoveEntities(this IEntityCollection entityCollection, params IEntity[] entities) { foreach (var entity in entities) { entityCollection.RemoveEntity(entity.Id); } }
public void RemoveUI(IEntity ui) { if (ui != null) { defaultConllection.RemoveEntity(ui.Id); eventSystem.Publish(new UIRemovedEvent(ui)); } }
public static void RemoveEntities(this IEntityCollection entityCollection, Func <IEntity, bool> predicate) { var entities = entityCollection.Where(predicate).ToArray(); for (var i = 0; i < entities.Length; i++) { entityCollection.RemoveEntity(entities[i].Id); } }
public static void RemoveAllEntities(this IEntityCollection entityCollection) { var entities = entityCollection.ToArray(); for (var i = 0; i < entities.Length; i++) { entityCollection.RemoveEntity(entities[i].Id); } }
public static void RemoveEntities(this IEntityCollection entityCollection, Func <IEntity, bool> predicate) { var entities = entityCollection.Where(predicate).ToArray(); foreach (var entity in entities) { entityCollection.RemoveEntity(entity.Id); } }
public static void RemoveAllEntities(this IEntityCollection entityCollection) { var entities = entityCollection.ToArray(); foreach (var entity in entities) { entityCollection.RemoveEntity(entity.Id); } }
public virtual void RemoveEntityFromContainer(IEntity ent) { if (m_entityCollection != null) { m_entityCollection.RemoveEntity(ent); if (m_entityCollection.Count == 0) { m_entityCollection = null; } } }
public static void RemoveEntitiesContaining(this IEntityCollection entityCollection, params Type[] components) { var entities = entityCollection .Where(entity => components.Any(x => entity.HasAllComponents(x))) .ToArray(); for (var i = 0; i < entities.Length; i++) { entityCollection.RemoveEntity(entities[i].Id); } }
public static void RemoveEntitiesContaining(this IEntityCollection entityCollection, params Type[] components) { var entities = entityCollection .Where(entity => components.Any(type => entity.HasAllComponents(type))) .ToArray(); foreach (var entity in entities) { entityCollection.RemoveEntity(entity.Id); } }
public static void RemoveEntitiesContaining <T>(this IEntityCollection entityCollection) where T : class, IComponent { var entities = entityCollection .Where(entity => entity.HasComponent <T>()) .ToArray(); for (var i = 0; i < entities.Length; i++) { entityCollection.RemoveEntity(entities[i].Id); } }
public static void RemoveEntitiesContaining <T>(this IEntityCollection entityCollection) where T : class, IComponent { var entities = entityCollection .Where(entity => entity.HasComponent <T>()) .ToArray(); foreach (var entity in entities) { entityCollection.RemoveEntity(entity.Id); } }
public void Process(IEntity entity) { _defaultCollection.RemoveEntity(entity.Id); }