pub trait System {
type Components: ComponentManager;
type Services: ServiceManager;
// Provided methods
fn activated(
&mut self,
_: &EntityData<'_, Self::Components>,
_: &Self::Components,
_: &mut Self::Services,
) { ... }
fn reactivated(
&mut self,
e: &EntityData<'_, Self::Components>,
c: &Self::Components,
s: &mut Self::Services,
) { ... }
fn deactivated(
&mut self,
_: &EntityData<'_, Self::Components>,
_: &Self::Components,
_: &mut Self::Services,
) { ... }
}
Expand description
Generic base system type.
Required Associated Types§
Provided Methods§
Sourcefn activated(
&mut self,
_: &EntityData<'_, Self::Components>,
_: &Self::Components,
_: &mut Self::Services,
)
fn activated( &mut self, _: &EntityData<'_, Self::Components>, _: &Self::Components, _: &mut Self::Services, )
Optional method called when an entity is activated.
Sourcefn reactivated(
&mut self,
e: &EntityData<'_, Self::Components>,
c: &Self::Components,
s: &mut Self::Services,
)
fn reactivated( &mut self, e: &EntityData<'_, Self::Components>, c: &Self::Components, s: &mut Self::Services, )
Optional method called when an entity is reactivated.
By default it calls deactivated() followed by activated()
Sourcefn deactivated(
&mut self,
_: &EntityData<'_, Self::Components>,
_: &Self::Components,
_: &mut Self::Services,
)
fn deactivated( &mut self, _: &EntityData<'_, Self::Components>, _: &Self::Components, _: &mut Self::Services, )
Optional method called when an entity is deactivated.