summaryrefslogtreecommitdiff
path: root/ecs/examples/event_loop.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/examples/event_loop.rs')
-rw-r--r--ecs/examples/event_loop.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ecs/examples/event_loop.rs b/ecs/examples/event_loop.rs
index c9f7757..2365eb0 100644
--- a/ecs/examples/event_loop.rs
+++ b/ecs/examples/event_loop.rs
@@ -21,7 +21,7 @@ struct Name
name: &'static str,
}
-fn sheer(query: Query<(Wool, Name)>)
+fn sheer(query: Query<(&mut Wool, &Name)>)
{
for (mut wool, name) in &query {
if wool.remaining == 0 {
@@ -37,7 +37,7 @@ fn sheer(query: Query<(Wool, Name)>)
}
}
-fn feed(query: Query<(Health, Name)>)
+fn feed(query: Query<(&mut Health, &Name)>)
{
for (mut health, name) in &query {
health.health += 1;
@@ -46,7 +46,7 @@ fn feed(query: Query<(Health, Name)>)
}
}
-fn age(query: Query<(Health, Name)>, mut actions: Actions)
+fn age(query: Query<(&mut Health, &Name)>, mut actions: Actions)
{
for (mut health, name) in &query {
if health.health <= 2 {