diff --git a/README.md b/README.md index ee84a1aa44cd24149138709cc295918af151cbab..b143e254dde889c8fe2a96fedf30f32007bf373d 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ pub fn score_thirst_system( ) { for (Parent(actor), mut score) in query.iter_mut() { if let Ok(thirst) = thirsts.get(*actor) { - *score = Score(thirst.thirst); + score.0 = thirst.thirst; } } } diff --git a/examples/thirst.rs b/examples/thirst.rs index cadfc2a0ccce72dda30f66d943b25421e5ad3893..73c3099c7a63de3243f4a3547112eb77991a8e58 100644 --- a/examples/thirst.rs +++ b/examples/thirst.rs @@ -107,7 +107,7 @@ pub fn thirsty_scorer_system( // calculation here, possibly to clamp the value to a range, add a // curve, etc. In our case, we'll just assume thirst goes from // 0.0..100.0, to keep things simple. - *score = Score(thirst.thirst); + score.0 = thirst.thirst; } } }