diff options
Diffstat (limited to 'ecs/src/component.rs')
-rw-r--r-- | ecs/src/component.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ecs/src/component.rs b/ecs/src/component.rs index d3b00ef..5c0b9ce 100644 --- a/ecs/src/component.rs +++ b/ecs/src/component.rs @@ -28,6 +28,11 @@ pub trait Component: SystemInput + Any + TypeName #[doc(hidden)] fn as_any(&self) -> &dyn Any; + + fn is_optional(&self) -> bool + { + false + } } impl dyn Component @@ -80,6 +85,11 @@ where { self } + + fn is_optional(&self) -> bool + { + true + } } impl<ComponentT> TypeName for Option<ComponentT> |