feat: ghost animation states, frightened/eaten behaviors, smallvec animation arrays

This commit is contained in:
Ryan Walters
2025-09-01 11:46:18 -05:00
parent 8f504d6c77
commit 98196f3e07
10 changed files with 448 additions and 95 deletions

View File

@@ -8,7 +8,7 @@ use crate::error::GameError;
use crate::events::GameEvent;
use crate::map::builder::Map;
use crate::systems::movement::Position;
use crate::systems::{AudioEvent, Ghost, PlayerControlled, ScoreResource, Vulnerable};
use crate::systems::{AudioEvent, Eaten, Ghost, PlayerControlled, ScoreResource, Vulnerable};
#[derive(Component)]
pub struct Collider {
@@ -136,7 +136,7 @@ pub fn ghost_collision_system(
score.0 += 200;
// Remove the ghost
commands.entity(ghost_ent).despawn();
commands.entity(ghost_ent).remove::<Vulnerable>().insert(Eaten);
// Play eat sound
events.write(AudioEvent::PlayEat);