diff --git a/src/ecs/component.rs b/src/ecs/component.rs index cff7fa4..5308302 100644 --- a/src/ecs/component.rs +++ b/src/ecs/component.rs @@ -37,6 +37,18 @@ impl Component { unsafe { Flags::from_bits_masked(self.high) } } + #[inline] + #[must_use] + pub fn is_entity(&self) -> bool { + self.flags() == Flags::NONE + } + + #[inline] + #[must_use] + pub fn is_relation(&self) -> bool { + self.flags() == Flags::RELATION + } + #[inline] #[must_use] pub fn to_bits(&self) -> u64 {