diff options
| author | HampusM <hampus@hampusmat.com> | 2026-06-30 20:44:59 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-06-30 20:44:59 +0200 |
| commit | 7207130d77b3a44f7305769cbe56948ea198745a (patch) | |
| tree | a43ebb077cd4237452711b06f86bd97c13b4fc64 /engine/src/lib.rs | |
| parent | 9e7967a26fd76a669a17b29b1224bb4b7bb0822b (diff) | |
Diffstat (limited to 'engine/src/lib.rs')
| -rw-r--r-- | engine/src/lib.rs | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/engine/src/lib.rs b/engine/src/lib.rs index f651655..01c0701 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -3,16 +3,12 @@ use crate::asset::{Assets, Extension as AssetExtension}; use crate::delta_time::{update as update_delta_time, DeltaTime, LastUpdate}; -use crate::ecs::component::Sequence as ComponentSequence; use crate::ecs::error::HandlerFn as ErrorHandlerFn; use crate::ecs::extension::Extension; use crate::ecs::phase::PRE_UPDATE as PRE_UPDATE_PHASE; -use crate::ecs::sole::Sole; use crate::ecs::system::initializable::Initializable; -use crate::ecs::system::observer::Observer; -use crate::ecs::system::{Into, System}; -use crate::ecs::uid::Uid; -use crate::ecs::{SoleAlreadyExistsError, World}; +use crate::ecs::system::Into; +use crate::ecs::World; use crate::shader::Extension as ShaderExtension; mod util; @@ -100,44 +96,6 @@ impl Engine self } - pub fn spawn<Comps>(&mut self, components: Comps) -> Uid - where - Comps: ComponentSequence, - { - self.world.create_entity(components) - } - - pub fn register_system<'this, SystemImpl>( - &'this mut self, - phase_euid: Uid, - system: impl System<'this, SystemImpl>, - ) - { - self.world.register_system(phase_euid, system); - } - - pub fn register_observer<'this, SystemImpl>( - &'this mut self, - observer: impl Observer<'this, SystemImpl>, - ) - { - self.world.register_observer(observer); - } - - /// Adds a globally shared singleton value. - /// - /// # Errors - /// Returns `Err` if this [`Sole`] has already been added. - pub fn add_sole(&mut self, sole: impl Sole) -> Result<(), SoleAlreadyExistsError> - { - self.world.add_sole(sole) - } - - pub fn add_extension(&mut self, extension: impl Extension) - { - self.world.add_extension(extension); - } - /// Runs the event loop. pub fn start(&mut self) { |
