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>
This commit is contained in:
parent
e3126a494f
commit
57c83158bc
@ -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<T>` 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<T>` 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`.
|
||||
|
Loading…
Reference in New Issue
Block a user