summaryrefslogtreecommitdiff
path: root/ecs/examples/relationship.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-08-20 17:09:08 +0200
committerHampusM <hampus@hampusmat.com>2025-08-20 17:09:08 +0200
commit29ee29b3887773e36fb7ad55ab44392dae7f8412 (patch)
tree296b1ad0b2f04f0f577e6e5643e27a9222f7cf66 /ecs/examples/relationship.rs
parent5c9113431ea22c53cc59324c93ec3dc6efdfe926 (diff)
feat(ecs): add funcs for getting target comp of wildcard pairs
Diffstat (limited to 'ecs/examples/relationship.rs')
-rw-r--r--ecs/examples/relationship.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ecs/examples/relationship.rs b/ecs/examples/relationship.rs
index f99d090..6ad08e7 100644
--- a/ecs/examples/relationship.rs
+++ b/ecs/examples/relationship.rs
@@ -22,10 +22,10 @@ struct Holding;
fn print_player_stats(player_query: Query<(&Player, &Health, Pair<Holding, Wildcard>)>)
{
- for (_, health, sword_relationship) in &player_query {
+ for (_, health, target_sword) in &player_query {
println!("Player health: {}", health.health);
- if let Some(sword_ent) = sword_relationship.get_target_entity() {
+ if let Some(sword_ent) = target_sword.get_entity() {
let sword = sword_ent
.get::<Sword>()
.expect("Sword entity is missing sword component");