public void Execute(Entity ent, int idx, [ReadOnly] ref Translation trans) { if (BoundUtil.IsOutOfBounds(bounds, trans.Value.x, trans.Value.y)) { commandBuffer.DestroyEntity(idx, ent); } }
public void Execute(Entity ent, int idx, [ReadOnly] ref Translation trans, [ReadOnly] ref BoundMarkerConvert convert) { if (!BoundUtil.IsOutOfBounds(bounds, trans.Value.x, trans.Value.y)) { commandBuffer.RemoveComponent(idx, ent, typeof(BoundMarkerConvert)); // add new marker switch (convert.newMarker) { case InteractionType.KeepIn: commandBuffer.AddComponent(idx, ent, new BoundMarkerIn()); break; case InteractionType.DeleteOutside: commandBuffer.AddComponent(idx, ent, new BoundMarkerDelete()); break; } } }