public void Update() { if (!_inProgress) { return; } _queryBuilder.ForEach((Entity entity, ref TComponent component, ref TMarker marker) => { if (_items.ContainsKey(entity)) { if (component.Completed) { OnItemCompleted?.Invoke(entity, ref component, ref marker); _items.Remove(entity); } } }); if (_inProgress && _items.Count == 0) { _inProgress = false; Completed = true; OnCompleted?.Invoke(this); OnReadyToRelease?.Invoke(this); } }
public void Update() { if (!Completed) { Completed = true; OnReadyToRelease?.Invoke(this); } }
public void Update() { if (_client == Entity.Null) { return; } _queryBuilder.ForEach((Entity entity, ref TComponent component, ref TMarker marker) => { if (_client == entity) { if (component.Completed) { _client = Entity.Null; Completed = true; OnCompleted?.Invoke(entity, ref component, ref marker); OnReadyToRelease?.Invoke(this); } } }); }