From a44e663eb6d4aaf567dd35f2676014ba5aaa9e00 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 5 Jan 2025 22:03:34 +0100 Subject: feat(ecs): allow control over component mutability in query --- ecs/examples/relationship.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ecs/examples/relationship.rs') 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)>) +fn print_player_stats( + player_query: Query<(&Player, &Health, &Relationship)>, +) { for (_, health, sword_relationship) in &player_query { println!("Player health: {}", health.health); -- cgit v1.2.3-18-g5258