summaryrefslogtreecommitdiff
path: root/ecs/examples/relationship.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-08-18 21:57:07 +0200
committerHampusM <hampus@hampusmat.com>2024-08-18 21:57:07 +0200
commit681e6f98b6dc21208f702dd33d268e95dae05732 (patch)
treeaee008bcf84cef8f1caf5f158174edbc0ceda5b3 /ecs/examples/relationship.rs
parentadae9bb8a47071cae274886e777a51df54f27665 (diff)
feat(ecs): make relationships able to have multiple targets
Diffstat (limited to 'ecs/examples/relationship.rs')
-rw-r--r--ecs/examples/relationship.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ecs/examples/relationship.rs b/ecs/examples/relationship.rs
index 33b7091..e8fb327 100644
--- a/ecs/examples/relationship.rs
+++ b/ecs/examples/relationship.rs
@@ -24,7 +24,7 @@ fn print_player_stats(player_query: Query<(Player, Health, Relationship<Holding,
for (_, health, sword_relationship) in &player_query {
println!("Player health: {}", health.health);
- if let Some(sword) = sword_relationship.get() {
+ if let Some(sword) = sword_relationship.get(0) {
println!("Player sword attack strength: {}", sword.attack_strength);
}
}