feat: add explosion animations on entity destruction
Spawn expanding/fading orange explosion effects when enemies or the player are destroyed. Explosions scale from 15x15 to 50x50 over 0.4s while fading from full opacity to transparent, then auto-despawn. Integration points: - Enemy killed by player bullet (bullet.rs) - Player hit by enemy bullet (bullet.rs) - Player collides with enemy (player.rs) - both explode - Captured player released (player.rs) Refs: GAL-44
This commit is contained in:
parent
db061820b9
commit
2ff561efb1
6 changed files with 77 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ use bullet::{
|
|||
move_enemy_bullets,
|
||||
};
|
||||
use stage::check_stage_clear;
|
||||
use systems::{player_exists, player_vulnerable, setup, should_respawn_player, update_window_title};
|
||||
use systems::{player_exists, player_vulnerable, setup, should_respawn_player, update_window_title, animate_explosion};
|
||||
use starfield::scroll_starfield;
|
||||
|
||||
fn main() {
|
||||
|
|
@ -119,6 +119,8 @@ fn main() {
|
|||
)
|
||||
// Starfield runs in all states
|
||||
.add_systems(Update, scroll_starfield)
|
||||
// Explosion animation runs in all states
|
||||
.add_systems(Update, animate_explosion)
|
||||
// UI and state management systems
|
||||
.add_systems(OnEnter(AppState::StartMenu), setup_start_menu_ui)
|
||||
.add_systems(OnExit(AppState::StartMenu), cleanup_start_menu_ui)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue