bevy_prototype_schedule_states

Crates.iobevy_prototype_schedule_states
lib.rsbevy_prototype_schedule_states
version0.1.1
sourcesrc
created_at2022-03-18 05:08:15.218332
updated_at2022-03-20 06:43:06.209803
descriptionBevy plugin for states as schedules
homepagehttps://github.com/hymm/bevy_prototype_schedule_states
repositoryhttps://github.com/hymm/bevy_prototype_schedule_states
max_upload_size
id552534
size101,443
Mike (hymm)

documentation

https://docs.rs/hymm/bevy_prototype_schedule_states

README

bevy_prototype_schedule_states

This library is a experimental state abstraction for Bevy that is compatible with the built-in FixedTimestep. This library works by giving each state enter, update, and exit a Schedule and runs these schedules from inside an exclusive system.

Comparison to Bevy's Builtin State API

Pros

  • Does not use run criteria, so is compatible with Bevy's built-in fixed timestep.
  • Simpler, so there is less surprising behavior.
  • Can nest states for more complex states.

Cons

  • There is no stack so cannot run multiple states at once.
  • Potentially less parallelism between systems since it's built on looping inside an exclusive system instead of run criteria.

Usage

See examples in repo.

Commit count: 25

cargo fmt