single global observers root node (#25)

plus auto name observer macro `global_observer`
This commit is contained in:
extrawurst
2025-04-07 18:22:29 +02:00
committed by GitHub
parent 92da1587ba
commit ddc57ec1e8
17 changed files with 94 additions and 37 deletions

View File

@@ -4,6 +4,7 @@ mod thrown;
use crate::{
GameState,
aim::AimTarget,
global_observer,
heads::ActiveHeads,
hitpoints::Hit,
physics_layers::GameLayer,
@@ -74,7 +75,7 @@ pub fn plugin(app: &mut App) {
app.add_systems(Update, enemy_hit.run_if(in_state(GameState::Playing)));
app.add_observer(on_trigger_state);
global_observer!(app, on_trigger_state);
}
fn enemy_hit(