feat: implement stage transition for ghost eaten pause and add TimeToLive component

- `StageTransition` enum allows for collision system to apply state transition for ghost pausing.
- Added `TimeToLive` component & `time_to_live_system` to provide temporary sprite rendering of bonus sprites.
- Updated `stage_system` to handle the new ghost eaten pause state, including freezing entities and spawning bonus points.
This commit is contained in:
Ryan Walters
2025-09-08 13:01:40 -05:00
parent ca50d0f3d8
commit 49a6a5cc39
9 changed files with 187 additions and 67 deletions
+5
View File
@@ -14,6 +14,11 @@ impl TileSequence {
Self { tiles: tiles.to_vec() }
}
/// Creates a tile sequence with a single tile.
pub fn single(tile: AtlasTile) -> Self {
Self { tiles: vec![tile] }
}
/// Returns the tile at the given frame index, wrapping if necessary
pub fn get_tile(&self, frame: usize) -> AtlasTile {
if self.tiles.is_empty() {