bevy/crates
CGMossa 86ad5bf420 Adding WorldQuery for WithBundle (#2024)
In response to #2023, here is a draft for a PR. 

Fixes #2023

I've added an example to show how to use `WithBundle`, and also to test it out. 

Right now there is a bug: If a bundle and a query are "the same", then it doesn't filter out
what it needs to filter out. 

Example: 

```
Print component initated from bundle.
[examples/ecs/query_bundle.rs:57] x = Dummy( <========= This should not get printed
    111,
)
[examples/ecs/query_bundle.rs:57] x = Dummy(
    222,
)
Show all components
[examples/ecs/query_bundle.rs:50] x = Dummy(
    111,
)
[examples/ecs/query_bundle.rs:50] x = Dummy(
    222,
)
```

However, it behaves the right way, if I add one more component to the bundle,
so the query and the bundle doesn't look the same:

```
Print component initated from bundle.
[examples/ecs/query_bundle.rs:57] x = Dummy(
    222,
)
Show all components
[examples/ecs/query_bundle.rs:50] x = Dummy(
    111,
)
[examples/ecs/query_bundle.rs:50] x = Dummy(
    222,
)
```

I hope this helps. I'm definitely up for tinkering with this, and adding anything that I'm asked to add
or change. 





Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2021-04-28 21:03:10 +00:00
..
bevy_app Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_asset Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_audio Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_core Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_derive EnumVariantMeta derive (#1972) 2021-04-21 23:46:54 +00:00
bevy_diagnostic Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_dylib Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_dynamic_plugin Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_ecs Adding WorldQuery for WithBundle (#2024) 2021-04-28 21:03:10 +00:00
bevy_gilrs Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_gltf calculate flat normals for mesh if missing (#1808) 2021-04-15 21:06:49 +00:00
bevy_input Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_internal Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_log Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_math Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_pbr Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_reflect Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_render Fix mesh with no vertex attributes causing panic (#2036) 2021-04-28 19:04:01 +00:00
bevy_scene Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_sprite Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_tasks Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_text Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_transform Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_ui Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_utils EnumVariantMeta derive (#1972) 2021-04-21 23:46:54 +00:00
bevy_wgpu Automatic System Spans (#2033) 2021-04-28 18:41:16 +00:00
bevy_window Hide re-exported docs (#1985) 2021-04-27 18:29:33 +00:00
bevy_winit Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00