From 06750934c33a8b1458d60fe8d877bbf29ffda955 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 11 Nov 2024 00:14:06 +0100 Subject: chore(engine): use new entity IDs --- engine/src/lib.rs | 4 ++-- engine/src/renderer/opengl.rs | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/engine/src/lib.rs b/engine/src/lib.rs index 5df2292..abf26f5 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -2,13 +2,13 @@ #![allow(clippy::needless_pass_by_value)] use ecs::component::Sequence as ComponentSequence; -use ecs::entity::Uid as EntityUid; use ecs::event::component::TypeTransformComponentsToAddedEvents; use ecs::event::{Event, Sequence as EventSequence}; use ecs::extension::Extension; use ecs::sole::Sole; use ecs::system::{Into, System}; use ecs::tuple::Reduce as TupleReduce; +use ecs::uid::Uid; use ecs::{SoleAlreadyExistsError, World}; use crate::delta_time::{update as update_delta_time, DeltaTime, LastUpdate}; @@ -83,7 +83,7 @@ impl Engine Self { world } } - pub fn spawn(&mut self, components: Comps) -> EntityUid + pub fn spawn(&mut self, components: Comps) -> Uid where Comps: ComponentSequence + TupleReduce, Comps::Out: EventSequence, diff --git a/engine/src/renderer/opengl.rs b/engine/src/renderer/opengl.rs index 463e654..a353c6a 100644 --- a/engine/src/renderer/opengl.rs +++ b/engine/src/renderer/opengl.rs @@ -174,8 +174,10 @@ fn render( new_gl_objects = Some(gl_objects.clone()); - actions - .add_components(query.entity_uid(entity_index).unwrap(), (gl_objects,)); + actions.add_components( + query.get_entity_uid(entity_index).unwrap(), + (gl_objects,), + ); &*new_gl_objects.unwrap() }; -- cgit v1.2.3-18-g5258