mirror of
https://github.com/Xevion/Pac-Man.git
synced 2026-01-31 12:25:04 -06:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user