bevy/crates
BD103 99261232f1
Add example using State in docs (#11319)
# Objective

- It may be confusing whether
[`State`](https://docs.rs/bevy_ecs/latest/bevy_ecs/schedule/struct.State.html)
is a `Resource` or a `SystemParam`.
- Fixes #11312.

## Solution

- Add an example using `State` in a system in the docs, to clarify that
it is a `Resource`.

---

I basically copied the example from
[`States`](https://docs.rs/bevy_ecs/latest/bevy_ecs/schedule/trait.States.html)
and added a system beside it. I don't have a strong opinion on what the
example should look like, so please comment if you have a better idea.
:)
2024-01-13 13:24:00 +00:00
..
bevy_a11y resolve all internal ambiguities (#10411) 2024-01-09 19:08:15 +00:00
bevy_animation Update glam, encase and hexasphere (#11082) 2024-01-08 22:58:45 +00:00
bevy_app resolve all internal ambiguities (#10411) 2024-01-09 19:08:15 +00:00
bevy_asset Better error message on incorrect asset label (#11254) 2024-01-08 22:45:07 +00:00
bevy_audio resolve all internal ambiguities (#10411) 2024-01-09 19:08:15 +00:00
bevy_core Replace or document ignored doctests (#11040) 2024-01-01 16:50:56 +00:00
bevy_core_pipeline Revert "Implement minimal reflection probes. (#10057)" (#11307) 2024-01-12 20:41:51 +00:00
bevy_derive Reexport winit::platform::android::activity::* in bevy_winit (#11011) 2023-12-19 20:15:03 +00:00
bevy_diagnostic Replace or document ignored doctests (#11040) 2024-01-01 16:50:56 +00:00
bevy_dylib Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_dynamic_plugin Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_ecs Add example using State in docs (#11319) 2024-01-13 13:24:00 +00:00
bevy_ecs_compile_fail_tests Rename WorldQueryData & WorldQueryFilter to QueryData & QueryFilter (#10779) 2023-12-12 19:45:50 +00:00
bevy_encase_derive Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_gilrs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
bevy_gizmos resolve all internal ambiguities (#10411) 2024-01-09 19:08:15 +00:00
bevy_gltf assets should be kept on CPU by default (#11212) 2024-01-05 05:53:47 +00:00
bevy_hierarchy Rename "AddChild" to "PushChild" (#11194) 2024-01-04 16:06:14 +00:00
bevy_input Extend Touches with clear and reset methods (#10930) 2024-01-04 23:13:29 +00:00
bevy_internal Revert "Implement minimal reflection probes. (#10057)" (#11307) 2024-01-12 20:41:51 +00:00
bevy_log Print to stderr from panic handler in LogPlugin (#11170) 2024-01-01 17:10:20 +00:00
bevy_macro_utils Replace or document ignored doctests (#11040) 2024-01-01 16:50:56 +00:00
bevy_macros_compile_fail_tests Standardize toml format with taplo (#10594) 2023-11-21 01:04:14 +00:00
bevy_math Implement bounding volume types (#10946) 2024-01-10 23:18:51 +00:00
bevy_mikktspace Update glam, encase and hexasphere (#11082) 2024-01-08 22:58:45 +00:00
bevy_pbr Simplify conditions (#11316) 2024-01-13 13:22:17 +00:00
bevy_ptr Simplify equality assertions (#10988) 2023-12-16 23:58:41 +00:00
bevy_reflect Update glam, encase and hexasphere (#11082) 2024-01-08 22:58:45 +00:00
bevy_reflect_compile_fail_tests Fix nested generics in Reflect derive (#10791) 2023-11-29 01:46:09 +00:00
bevy_render Revert "Implement minimal reflection probes. (#10057)" (#11307) 2024-01-12 20:41:51 +00:00
bevy_scene Change Entity::generation from u32 to NonZeroU32 for niche optimization (#9907) 2024-01-08 23:03:00 +00:00
bevy_sprite assets should be kept on CPU by default (#11212) 2024-01-05 05:53:47 +00:00
bevy_tasks Replace or document ignored doctests (#11040) 2024-01-01 16:50:56 +00:00
bevy_text resolve all internal ambiguities (#10411) 2024-01-09 19:08:15 +00:00
bevy_time Add paused run condition (#11313) 2024-01-12 22:18:57 +00:00
bevy_transform Rename "AddChild" to "PushChild" (#11194) 2024-01-04 16:06:14 +00:00
bevy_ui resolve all internal ambiguities (#10411) 2024-01-09 19:08:15 +00:00
bevy_utils Add static assertions to bevy_utils for compile-time checks (#11182) 2024-01-02 22:08:30 +00:00
bevy_window Remove CanvasParentResizePlugin (#11057) 2023-12-21 20:01:22 +00:00
bevy_winit resolve all internal ambiguities (#10411) 2024-01-09 19:08:15 +00:00