public Entity(params IComponent[] components) { Id = Guid.NewGuid(); foreach (IComponent component in components) { EntityInfrastructureManager.AddComponent(this, component); } EntityInfrastructureManager.AddEntity(this); }
public void AddComponent <ComponentType>(ComponentType component) where ComponentType : IComponent { EntityInfrastructureManager.AddComponent(this, component); }