Crates.io | bevy_flurx |
lib.rs | bevy_flurx |
version | |
source | src |
created_at | 2024-03-14 07:45:19.502619 |
updated_at | 2024-12-08 09:12:50.122162 |
description | Allows you to write sequential description of processes involving delays, user input, and other waits. |
homepage | |
repository | https://github.com/not-elm/bevy_flurx |
max_upload_size | |
id | 1173098 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
This library provides a mechanism for more sequential description of delays, character movement, waiting for user input, and other state waits.
As an example, here is an example of a cut-in effect that involves waiting for user input, a slight delay, and a sprite to move.
The full source code can be found here.
fn spawn_reactor(
mut commands: Commands
) {
commands.spawn(Reactor::schedule(|task| async move {
task.will(Update, {
wait::input::just_pressed().with(KeyCode::KeyR)
.then(once::switch::on::<CutInBackground>())
.then(delay::time().with(Duration::from_millis(100)))
.then(once::switch::on::<HandsomeFerris>())
.then(wait::both(
wait::switch::off::<CutInBackground>(),
wait::switch::off::<HandsomeFerris>(),
))
.then(once::switch::on::<MoveSlowly>())
.then(delay::time().with(Duration::from_millis(500)))
.then(once::switch::off::<MoveSlowly>())
.then(once::switch::on::<MoveFast>())
.then(delay::time().with(Duration::from_millis(300)))
.then(once::event::app_exit())
})
.await;
}));
}
All examples are here
.
flag name | short description | default |
---|---|---|
audio | audio actions | true |
record | undo/redo actions and events | true |
effect | thread/async side effects | true |
tokio | async-compat and async actions | false |
Provides the actions that perform simple audio playback and waiting using bevy's default audio functionality.
Provides Record
to manage operation history.
Allows to convert the operations with side effects such as asynchronous runtime or thread into the referential-transparent actions.
You will be able to write processes that depend on tokio's runtime in the reactor.
Please see here.
bevy_flurx | bevy |
---|---|
0.3.0 | 0.13.0 |
0.3.1 | 0.13.1 |
0.3.2 ~ 0.5.3 | 0.13.2 |
0.6.0 | 0.14.1 |
0.7.0 | 0.15 |
This crate is licensed under the MIT License or the Apache License 2.0.