From 57c83158bccd29d658fd4bdfbf743cf45927b5e5 Mon Sep 17 00:00:00 2001 From: Tygyh <32486062+tygyh@users.noreply.github.com> Date: Thu, 1 Feb 2024 10:42:44 +0100 Subject: [PATCH] Rephrase comment about Local for clarity. (Adopted) (#11129) # Objective - Finish PR #10322 ## Solution - Rebase changes in PR #10322 and format the changes. Co-authored-by: Mauer-Oats --- examples/ecs/ecs_guide.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/ecs/ecs_guide.rs b/examples/ecs/ecs_guide.rs index a34871c744ff5..e0836b86321f6 100644 --- a/examples/ecs/ecs_guide.rs +++ b/examples/ecs/ecs_guide.rs @@ -224,8 +224,9 @@ fn exclusive_player_system(world: &mut World) { } // Sometimes systems need to be stateful. Bevy's ECS provides the `Local` system parameter -// for this case. A `Local` refers to a value owned by the system of type `T`, which is automatically -// initialized using `T`'s `FromWorld`* implementation. In this system's `Local` (`counter`), `T` is `u32`. +// for this case. A `Local` refers to a value of type `T` that is owned by the system. +// This value is automatically initialized using `T`'s `FromWorld`* implementation upon the system's initialization upon the system's initialization. +// In this system's `Local` (`counter`), `T` is `u32`. // Therefore, on the first turn, `counter` has a value of 0. // // *: `FromWorld` is a trait which creates a value using the contents of the `World`.