diff options
author | HampusM <hampus@hampusmat.com> | 2025-08-09 14:03:42 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-08-09 14:03:42 +0200 |
commit | fb9263ff3fd6211d5ca19e182094e25835886503 (patch) | |
tree | ff6eb14bf252c220c712e2a4bbd6d03c6d610e47 /engine/src/window.rs | |
parent | bb7c7d2f7d9bd9ad074c0186f5d503ee96b2f106 (diff) |
Diffstat (limited to 'engine/src/window.rs')
-rw-r--r-- | engine/src/window.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engine/src/window.rs b/engine/src/window.rs index d342341..a335856 100644 --- a/engine/src/window.rs +++ b/engine/src/window.rs @@ -7,7 +7,7 @@ use ecs::extension::Collector as ExtensionCollector; use ecs::pair::{ChildOf, Pair}; use ecs::phase::{Phase, START as START_PHASE}; use ecs::sole::Single; -use ecs::{static_entity, Sole}; +use ecs::{declare_entity, Sole}; use glfw::window::{Hint as WindowCreationHint, HintValue as WindowCreationHintValue}; use glfw::WindowSize; use util_macros::VariantArr; @@ -16,7 +16,7 @@ use crate::data_types::dimens::Dimens; use crate::renderer::RENDER_PHASE; use crate::vector::Vec2; -static_entity!( +declare_entity!( pub UPDATE_PHASE, (Phase, Pair::new::<ChildOf>(*RENDER_PHASE)) ); @@ -692,8 +692,10 @@ impl ecs::extension::Extension for Extension { fn collect(self, mut collector: ExtensionCollector<'_>) { + collector.add_declared_entity(&self::UPDATE_PHASE); + collector.add_system(*START_PHASE, initialize); - collector.add_system(*UPDATE_PHASE, update); + collector.add_system(*self::UPDATE_PHASE, update); let window = self .window_builder |