Trait bevy_states_utils::AppExtension
source · pub trait AppExtension {
// Required methods
fn add_gc_state<S: States>(&mut self);
fn add_gc_resource<S: States, R: Resource>(&mut self, state: S);
fn add_substate<P: States, S: States + Default>(
&mut self,
parent: P,
sub: S
);
}
Expand description
Extension trait for bevy::prelude::App
Required Methods§
sourcefn add_gc_state<S: States>(&mut self)
fn add_gc_state<S: States>(&mut self)
This adds registers the required systems for Gc<S>
to work
sourcefn add_gc_resource<S: States, R: Resource>(&mut self, state: S)
fn add_gc_resource<S: States, R: Resource>(&mut self, state: S)
Mark a resource to be removed when exsiting a specific stage
sourcefn add_substate<P: States, S: States + Default>(&mut self, parent: P, sub: S)
fn add_substate<P: States, S: States + Default>(&mut self, parent: P, sub: S)
Setup nested states, when the parent state enters the specified state the child will be switched into the given state, if the parent leavs the state the child will be switched to its default state
Object Safety§
This trait is not object safe.