From 790c746a35d59be5070c40d6ca1f71cc9a2d094b Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 2 Nov 2026 03:33:04 +0100 Subject: feat(engine-ecs): add marker component for soles --- engine-ecs/src/sole.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engine-ecs/src/sole.rs') diff --git a/engine-ecs/src/sole.rs b/engine-ecs/src/sole.rs index 9168414..cf5283b 100644 --- a/engine-ecs/src/sole.rs +++ b/engine-ecs/src/sole.rs @@ -7,7 +7,7 @@ use crate::component::{ WithAssociatedId as ComponentWithAssociatedId, }; use crate::system::{Metadata as SystemMetadata, Param as SystemParam}; -use crate::World; +use crate::{Component, World}; /// A component which has a single instance in the [`World`]. pub trait Sole: Any + IntoComponentParts + ComponentWithAssociatedId @@ -20,6 +20,11 @@ pub trait Sole: Any + IntoComponentParts + ComponentWithAssociatedId fn name(&self) -> &'static str; } +/// Marker component for the entities of soles. +#[derive(Debug, Component)] +#[non_exhaustive] +pub struct Is; + /// Holds a reference to a singleton component. #[derive(Debug)] pub struct Single<'world, SoleT: Sole> -- cgit v1.2.3-18-g5258