Skip to content

Commit 57c8315

Browse files
tygyhmaueroats
andauthored
Rephrase comment about Local<T> for clarity. (Adopted) (#11129)
# Objective - Finish PR #10322 ## Solution - Rebase changes in PR #10322 and format the changes. Co-authored-by: Mauer-Oats <maueroats@users.noreply.github.com>
1 parent e3126a4 commit 57c8315

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/ecs/ecs_guide.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,9 @@ fn exclusive_player_system(world: &mut World) {
224224
}
225225

226226
// Sometimes systems need to be stateful. Bevy's ECS provides the `Local` system parameter
227-
// for this case. A `Local<T>` refers to a value owned by the system of type `T`, which is automatically
228-
// initialized using `T`'s `FromWorld`* implementation. In this system's `Local` (`counter`), `T` is `u32`.
227+
// for this case. A `Local<T>` refers to a value of type `T` that is owned by the system.
228+
// This value is automatically initialized using `T`'s `FromWorld`* implementation upon the system's initialization upon the system's initialization.
229+
// In this system's `Local` (`counter`), `T` is `u32`.
229230
// Therefore, on the first turn, `counter` has a value of 0.
230231
//
231232
// *: `FromWorld` is a trait which creates a value using the contents of the `World`.

0 commit comments

Comments
 (0)