Crate bevy_sequential_actions
source · [−]Expand description
Bevy Sequential Actions
A Bevy library that aims to execute a list of actions in a sequential manner. This generally means that one action runs at a time, and when it is done, the next action will start and so on until the list is empty.
Getting Started
An action is anything that implements the Action
trait,
and can be added to any Entity
that contains the ActionsBundle
.
fn setup(mut commands: Commands) {
// Create entity with ActionsBundle
let entity = commands.spawn_bundle(ActionsBundle::default()).id();
// Add a single action with default config
commands.actions(entity).add(wait_action);
// Add multiple actions with custom config
commands
.actions(entity)
.config(AddConfig {
// Add each action to the back of the queue
order: AddOrder::Back,
// Start the next action in the queue if nothing is currently running
start: true,
// Repeat the action by adding it back to the queue when it is removed
repeat: false,
})
.add(move_action)
.add(quit_action);
}
Structs
Commands for modifying actions inside the Action
trait.
Build a list of actions using Commands
.
Marker component for entities with ActionsBundle
.
Build a list of actions using World
.
Build a list of actions using ActionCommands
.
The component bundle that all entities with actions must have.
Modify actions using ActionCommands
.
Modify actions using Commands
.
Modify actions using World
.
Enums
The reason why an Action
was stopped.
Traits
The trait that all actions must implement.
Methods for building a list of actions.
Proxy method for modifying actions. Returns a type that implements ModifyActions
.
Conversion into an Action
.
Methods for modifying actions.