pub trait EntityComponentBehaviourManager:
Send
+ Sync
+ Lifecycle {
Show 14 methods
// Required methods
fn add_behaviours_to_entity(&self, entity_instance: ReactiveEntity);
fn add_behaviours_to_entity_component(
&self,
entity_instance: ReactiveEntity,
component: Component,
);
fn add_behaviour_to_entity_component(
&self,
entity_instance: ReactiveEntity,
component_behaviour_ty: &ComponentBehaviourTypeId,
);
fn remove_behaviour_from_entity(
&self,
entity_instance: ReactiveEntity,
behaviour_ty: &BehaviourTypeId,
);
fn remove_behaviours_from_entity(&self, entity_instance: ReactiveEntity);
fn remove_behaviours_from_entity_component(
&self,
entity_instance: ReactiveEntity,
component: Component,
);
fn remove_behaviours_by_id(&self, id: &Uuid);
fn remove_behaviours_by_behaviour(&self, behaviour_ty: &BehaviourTypeId);
fn has(
&self,
entity_instance: ReactiveEntity,
behaviour_ty: &BehaviourTypeId,
) -> bool;
fn get_all(&self, entity_instance: ReactiveEntity) -> Vec<BehaviourTypeId>;
fn get_instances_by_behaviour(
&self,
ty: &BehaviourTypeId,
) -> Vec<ReactiveEntity>;
fn connect(
&self,
entity_instance: ReactiveEntity,
behaviour_ty: &BehaviourTypeId,
) -> Result<(), BehaviourTransitionError>;
fn disconnect(
&self,
entity_instance: ReactiveEntity,
behaviour_ty: &BehaviourTypeId,
) -> Result<(), BehaviourTransitionError>;
fn reconnect(
&self,
entity_instance: ReactiveEntity,
behaviour_ty: &BehaviourTypeId,
) -> Result<(), BehaviourTransitionError>;
}
Required Methods§
Sourcefn add_behaviours_to_entity(&self, entity_instance: ReactiveEntity)
fn add_behaviours_to_entity(&self, entity_instance: ReactiveEntity)
Adds new behaviours to the given entity instance.
Sourcefn add_behaviours_to_entity_component(
&self,
entity_instance: ReactiveEntity,
component: Component,
)
fn add_behaviours_to_entity_component( &self, entity_instance: ReactiveEntity, component: Component, )
Possibly adds new behaviour to the given entity instance’s component
Sourcefn add_behaviour_to_entity_component(
&self,
entity_instance: ReactiveEntity,
component_behaviour_ty: &ComponentBehaviourTypeId,
)
fn add_behaviour_to_entity_component( &self, entity_instance: ReactiveEntity, component_behaviour_ty: &ComponentBehaviourTypeId, )
Creates and adds the given behaviour to the given reactive entity instance’s component.
Sourcefn remove_behaviour_from_entity(
&self,
entity_instance: ReactiveEntity,
behaviour_ty: &BehaviourTypeId,
)
fn remove_behaviour_from_entity( &self, entity_instance: ReactiveEntity, behaviour_ty: &BehaviourTypeId, )
Removes the given behaviour from the given reactive entity instance.
Sourcefn remove_behaviours_from_entity(&self, entity_instance: ReactiveEntity)
fn remove_behaviours_from_entity(&self, entity_instance: ReactiveEntity)
Removes behaviours from the given entity instance.
Sourcefn remove_behaviours_from_entity_component(
&self,
entity_instance: ReactiveEntity,
component: Component,
)
fn remove_behaviours_from_entity_component( &self, entity_instance: ReactiveEntity, component: Component, )
Removes behaviour from the given entity instance’s component
Sourcefn remove_behaviours_by_id(&self, id: &Uuid)
fn remove_behaviours_by_id(&self, id: &Uuid)
Removes behaviours from the given entity instance by uuid.
Sourcefn remove_behaviours_by_behaviour(&self, behaviour_ty: &BehaviourTypeId)
fn remove_behaviours_by_behaviour(&self, behaviour_ty: &BehaviourTypeId)
Removes all behaviours of the given behaviour type.
Sourcefn has(
&self,
entity_instance: ReactiveEntity,
behaviour_ty: &BehaviourTypeId,
) -> bool
fn has( &self, entity_instance: ReactiveEntity, behaviour_ty: &BehaviourTypeId, ) -> bool
Returns true, if the entity instance has the given behaviour.
Sourcefn get_all(&self, entity_instance: ReactiveEntity) -> Vec<BehaviourTypeId>
fn get_all(&self, entity_instance: ReactiveEntity) -> Vec<BehaviourTypeId>
Returns the behaviours of the given entity instance.
Sourcefn get_instances_by_behaviour(
&self,
ty: &BehaviourTypeId,
) -> Vec<ReactiveEntity>
fn get_instances_by_behaviour( &self, ty: &BehaviourTypeId, ) -> Vec<ReactiveEntity>
Returns the entity instances with the given behaviour.
Sourcefn connect(
&self,
entity_instance: ReactiveEntity,
behaviour_ty: &BehaviourTypeId,
) -> Result<(), BehaviourTransitionError>
fn connect( &self, entity_instance: ReactiveEntity, behaviour_ty: &BehaviourTypeId, ) -> Result<(), BehaviourTransitionError>
Connect
Sourcefn disconnect(
&self,
entity_instance: ReactiveEntity,
behaviour_ty: &BehaviourTypeId,
) -> Result<(), BehaviourTransitionError>
fn disconnect( &self, entity_instance: ReactiveEntity, behaviour_ty: &BehaviourTypeId, ) -> Result<(), BehaviourTransitionError>
Disconnect