summaryrefslogtreecommitdiff
path: root/engine/src
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-09-24 22:37:27 +0200
committerHampusM <hampus@hampusmat.com>2025-09-25 22:42:35 +0200
commit3bac271d4baa73844d4a0949946c6d9386d0db46 (patch)
tree3c7143ac5d3995c8d72273ba4fe66f6054dcd3c6 /engine/src
parentcbed21f5e6cfb449d49087cedc867c8e50721ba9 (diff)
refactor(engine): use Pair builder
Diffstat (limited to 'engine/src')
-rw-r--r--engine/src/input.rs8
-rw-r--r--engine/src/renderer.rs11
-rw-r--r--engine/src/window.rs2
3 files changed, 18 insertions, 3 deletions
diff --git a/engine/src/input.rs b/engine/src/input.rs
index af89271..c53175e 100644
--- a/engine/src/input.rs
+++ b/engine/src/input.rs
@@ -18,7 +18,13 @@ pub use reexports::*;
declare_entity!(
SET_PREV_KEY_STATE_PHASE,
- (Phase, Pair::new::<ChildOf>(*WINDOW_UPDATE_PHASE))
+ (
+ Phase,
+ Pair::builder()
+ .relation::<ChildOf>()
+ .target_id(*WINDOW_UPDATE_PHASE)
+ .build()
+ )
);
#[derive(Debug, Sole)]
diff --git a/engine/src/renderer.rs b/engine/src/renderer.rs
index 044554f..fcc96cc 100644
--- a/engine/src/renderer.rs
+++ b/engine/src/renderer.rs
@@ -4,4 +4,13 @@ use ecs::phase::{Phase, UPDATE as UPDATE_PHASE};
pub mod opengl;
-declare_entity!(pub RENDER_PHASE, (Phase, Pair::new::<ChildOf>(*UPDATE_PHASE)));
+declare_entity!(
+ pub RENDER_PHASE,
+ (
+ Phase,
+ Pair::builder()
+ .relation::<ChildOf>()
+ .target_id(*UPDATE_PHASE)
+ .build()
+ )
+);
diff --git a/engine/src/window.rs b/engine/src/window.rs
index a335856..f191c06 100644
--- a/engine/src/window.rs
+++ b/engine/src/window.rs
@@ -18,7 +18,7 @@ use crate::vector::Vec2;
declare_entity!(
pub UPDATE_PHASE,
- (Phase, Pair::new::<ChildOf>(*RENDER_PHASE))
+ (Phase, Pair::builder().relation::<ChildOf>().target_id(*RENDER_PHASE).build())
);
#[derive(Debug, Sole)]