bevy_query_observer 0.1.0

More sophisticated observers for Bevy
Documentation

bevy_query_observer

bevy_query_observer provides query-like observers for Bevy.

#[derive(Component)]
struct Red;

#[derive(Component)]
struct Blue;

fn despawn_red_and_blue(
    data: Start<Entity, (With<Red>, With<Blue>)>,
    mut commands: Commands,
) {
    commands.entity(*data).despawn();
}

These observers allow you to establish and maintain complex invariants across your entities.

The design of this crate is based on @chescock's Lifecycle event observers for queries proposal.

Bevy version compatibility

bevy bevy_query_observer
0.17 0.1

License