Skip to content

bevy-butler 0.5.2

Compare
Choose a tag to compare
@TGRCdev TGRCdev released this 27 Jan 01:23
· 41 commits to main since this release
483dafa

Additions

  • #[resource] can be used to automatically initialize resources upon your plugin being added [#7]
    #[derive(Resource)]
    #[resource(plugin = MyPlugin, init = Message("Hello, world!".to_string())]
    struct Message(String);
  • #[event] automatically registers events with app.add_event::<MyEvent>() [#9]
    #[derive(Event)]
    #[event(plugin = MyPlugin)]
    struct UserJoined(String);
  • #[system] now works with use statements [#11]
    mod my_mod {
        pub(super) fn hello_world() {
            info!("Hello, world!");
        }
    }
    
    #[system(plugin = MyPlugin, schedule = Startup)]
    use my_mod::hello_world;

Bug fixes

  • schedule now accepts expressions instead of just type paths, for schedules like OnEnter(MyState::MyVariant) [#12]