summaryrefslogtreecommitdiff
path: root/ecs/examples/multiple_queries.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-01-05 22:03:34 +0100
committerHampusM <hampus@hampusmat.com>2025-01-05 22:03:34 +0100
commita44e663eb6d4aaf567dd35f2676014ba5aaa9e00 (patch)
treecd81d1f61b33e1905d6b3def851e5be18838556b /ecs/examples/multiple_queries.rs
parentcd385ddedc767c953f24109ec3ffe0a07d247ff5 (diff)
feat(ecs): allow control over component mutability in query
Diffstat (limited to 'ecs/examples/multiple_queries.rs')
-rw-r--r--ecs/examples/multiple_queries.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ecs/examples/multiple_queries.rs b/ecs/examples/multiple_queries.rs
index 1ae9d19..e0c957f 100644
--- a/ecs/examples/multiple_queries.rs
+++ b/ecs/examples/multiple_queries.rs
@@ -31,8 +31,8 @@ impl Display for EnemyName
}
fn do_attacks(
- attacker_query: Query<(AttackStrength,)>,
- enemy_query: Query<(Health, EnemyName)>,
+ attacker_query: Query<(&AttackStrength,)>,
+ enemy_query: Query<(&mut Health, &EnemyName)>,
)
{
for (attack_strength,) in &attacker_query {