Implement damage UI, damage and stale moves. #45
@@ -49,3 +49,9 @@ pub fn spawn_battle_ui(mut commands: Commands, request: Res<PendingMatch>, fight
|
|||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn cleanup_battle_ui(mut commands: Commands, battle_ui: Query<Entity, With<BattleUI>>) {
|
||||||
|
for entity in battle_ui {
|
||||||
|
commands.entity(entity).despawn();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ pub struct InGameUIPlugin;
|
|||||||
impl Plugin for InGameUIPlugin {
|
impl Plugin for InGameUIPlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
app.add_systems(OnEnter(AppState::InMatch), battle_ui::spawn_battle_ui)
|
app.add_systems(OnEnter(AppState::InMatch), battle_ui::spawn_battle_ui)
|
||||||
|
.add_systems(OnExit(AppState::InMatch), battle_ui::cleanup_battle_ui)
|
||||||
.add_systems(PostUpdate, fighter_info::update_fighter_info_damage);
|
.add_systems(PostUpdate, fighter_info::update_fighter_info_damage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user