summaryrefslogtreecommitdiff
path: root/ecs/examples/event_loop.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-04-09 20:50:14 +0200
committerHampusM <hampus@hampusmat.com>2025-04-10 17:04:40 +0200
commit94e5e592baea2935af7c94ad44805a09d0e30740 (patch)
tree358f7496ac40e2a7d7cae10cf04bf25246debdec /ecs/examples/event_loop.rs
parentb982b205373f445db9ced7f3cf13c1156ad8a40a (diff)
feat(ecs): replace Relationship component with pair UID support
Diffstat (limited to 'ecs/examples/event_loop.rs')
-rw-r--r--ecs/examples/event_loop.rs17
1 files changed, 4 insertions, 13 deletions
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, <Relationship<ChildOf, Phase>>::new(*UPDATE_PHASE))
-);
+static_entity!(SHEER_PHASE, (Phase, Pair::new::<ChildOf>(*UPDATE_PHASE)));
-static_entity!(
- FEED_PHASE,
- (Phase, <Relationship<ChildOf, Phase>>::new(*SHEER_PHASE))
-);
+static_entity!(FEED_PHASE, (Phase, Pair::new::<ChildOf>(*SHEER_PHASE)));
-static_entity!(
- AGE_PHASE,
- (Phase, <Relationship<ChildOf, Phase>>::new(*FEED_PHASE))
-);
+static_entity!(AGE_PHASE, (Phase, Pair::new::<ChildOf>(*FEED_PHASE)));
fn main()
{