public void OnComponentAdded(Entity entity, object component) { if (!ConstituentTypes.Contains(component.GetType())) { return; } AddIfMatch(entity); }
public void OnComponentRemoved(Entity entity, object component) { //If the component isn't important, ignore it if (!ConstituentTypes.Contains(component.GetType())) { return; } //If it was, remove it Remove(entity); }