Crate bevy_flurx

source ·
Expand description

ECS consists of a group of very small independent systems. Although we find this architecture very nice, it takes a lot of effort to implement system interaction, especially state monitoring, and this problem becomes more pronounced as the application gets larger. For example, how can I play a sound effect just before the character starts moving, and then not accept any input until the character stop movement and the sound effect finished playing?

If only one process is waiting, simply use an event reader, but if more than one, you will probably need to create a structure to manage the status of multiple processes.

This problem is common in event-driven applications, and is often solved with async-await; This library also resolve this using async-await. Specifically, I use an asynchronous processing flow that I call Reactor.

Reactor can be used partially. This means there is no need to rewrite existing applications to use this library. And I recommend using it partially. This is because the system that runs Reactor and the systems that are run by Reactor run on the main thread. (Multithreading support is under consideration.)

Modules§

Macros§

  • Create actions that execute the passed actions in sequence.
  • Wait until all tasks done.

Structs§