diff options
author | HampusM <hampus@hampusmat.com> | 2025-01-05 22:03:34 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-01-05 22:03:34 +0100 |
commit | a44e663eb6d4aaf567dd35f2676014ba5aaa9e00 (patch) | |
tree | cd81d1f61b33e1905d6b3def851e5be18838556b /ecs/examples/relationship.rs | |
parent | cd385ddedc767c953f24109ec3ffe0a07d247ff5 (diff) |
feat(ecs): allow control over component mutability in query
Diffstat (limited to 'ecs/examples/relationship.rs')
-rw-r--r-- | ecs/examples/relationship.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ecs/examples/relationship.rs b/ecs/examples/relationship.rs index 1b3d1de..240884a 100644 --- a/ecs/examples/relationship.rs +++ b/ecs/examples/relationship.rs @@ -19,7 +19,9 @@ struct Health struct Holding; -fn print_player_stats(player_query: Query<(Player, Health, Relationship<Holding, Sword>)>) +fn print_player_stats( + player_query: Query<(&Player, &Health, &Relationship<Holding, Sword>)>, +) { for (_, health, sword_relationship) in &player_query { println!("Player health: {}", health.health); |