summaryrefslogtreecommitdiff
path: root/ecs/src/component
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-09-24 22:16:50 +0200
committerHampusM <hampus@hampusmat.com>2025-09-25 22:42:35 +0200
commitcbed21f5e6cfb449d49087cedc867c8e50721ba9 (patch)
tree3850ac5e7907a40e4c4e5627f547bd44c37896ce /ecs/src/component
parent8d76fe6be211dfc8fc57d4e2f7e312e757ca899c (diff)
refactor(ecs): replace Pair ctor functions with builder
Diffstat (limited to 'ecs/src/component')
-rw-r--r--ecs/src/component/local.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/ecs/src/component/local.rs b/ecs/src/component/local.rs
index 6b2463f..b19a30b 100644
--- a/ecs/src/component/local.rs
+++ b/ecs/src/component/local.rs
@@ -37,7 +37,11 @@ where
};
let Some(local_component) = system_ent.get_with_id_mut::<LocalComponent>(
- Pair::new::<IsLocalComponent>(LocalComponent::id()).id(),
+ Pair::builder()
+ .relation::<IsLocalComponent>()
+ .target::<LocalComponent>()
+ .build()
+ .id(),
) else {
panic!(
"Local component {} of system with ID {} is uninitialized",
@@ -60,7 +64,11 @@ where
fn initialize(system: &mut SystemT, input: Self::Input)
{
system.add_local_component(
- Pair::new_with_comp_target::<IsLocalComponent>(input).into_parts(),
+ Pair::builder()
+ .relation::<IsLocalComponent>()
+ .target_as_data(input)
+ .build()
+ .into_parts(),
);
}
}