From 94e5e592baea2935af7c94ad44805a09d0e30740 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 9 Apr 2025 20:50:14 +0200 Subject: feat(ecs): replace Relationship component with pair UID support --- ecs/examples/event_loop.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'ecs/examples/event_loop.rs') diff --git a/ecs/examples/event_loop.rs b/ecs/examples/event_loop.rs index 2365eb0..61d7ba4 100644 --- a/ecs/examples/event_loop.rs +++ b/ecs/examples/event_loop.rs @@ -1,6 +1,6 @@ use ecs::actions::Actions; +use ecs::pair::{ChildOf, Pair}; use ecs::phase::{Phase, UPDATE as UPDATE_PHASE}; -use ecs::relationship::{ChildOf, Relationship}; use ecs::{static_entity, Component, Query, World}; #[derive(Component)] @@ -65,20 +65,11 @@ fn age(query: Query<(&mut Health, &Name)>, mut actions: Actions) } } -static_entity!( - SHEER_PHASE, - (Phase, >::new(*UPDATE_PHASE)) -); +static_entity!(SHEER_PHASE, (Phase, Pair::new::(*UPDATE_PHASE))); -static_entity!( - FEED_PHASE, - (Phase, >::new(*SHEER_PHASE)) -); +static_entity!(FEED_PHASE, (Phase, Pair::new::(*SHEER_PHASE))); -static_entity!( - AGE_PHASE, - (Phase, >::new(*FEED_PHASE)) -); +static_entity!(AGE_PHASE, (Phase, Pair::new::(*FEED_PHASE))); fn main() { -- cgit v1.2.3-18-g5258