private void OnComponentRemoved(IEntity entity, Type component) { _families.Lock(); foreach (var pair in _families) { pair.ComponentRemoved(entity, component); } _families.UnLock(); }
public void AfterLocking_FamilyCanBeRetrieved() { _container.Add(typeof(Node <SpriteRenderer>), Substitute.For <IFamily>()); _container.Add(typeof(Node <Transform>), Substitute.For <IFamily>()); _container.Lock(); foreach (var family in _container) { _container.Add(typeof(Node <BoxCollider2D>), Substitute.For <IFamily>()); } _container.UnLock(); _container.Get(typeof(Node <BoxCollider2D>)); }