public BulletEntityCollector(BulletContext bulletContext, PlayerContext playerContext) { _group = bulletContext.GetGroup(BulletMatcher.AllOf(BulletMatcher.OwnerId).NoneOf(BulletMatcher.FlagDestroy)); _group.OnEntityAdded += GroupOnOnEntityAdded; _group.OnEntityRemoved += GroupOnOnEntityRemoved; _group.OnEntityUpdated += GroupOnOnEntityUpdated; _playerContext = playerContext; }
protected override IGroup <BulletEntity> GetIGroup(Contexts contexts) { return(contexts.bullet.GetGroup(BulletMatcher.AllOf(BulletMatcher.BulletAsset, BulletMatcher.Position))); }
public BulletCleanUpSystem(BulletContext bulletContext) { _group = bulletContext.GetGroup(BulletMatcher.AllOf(BulletMatcher.FlagDestroy)); }