Slightly rework death screen

This commit is contained in:
2025-03-07 23:08:08 -08:00
parent 8a61104868
commit 84570fe87d
9 changed files with 23 additions and 17 deletions

View File

@@ -15,17 +15,21 @@ public partial class GameLogic
var gameRepo = Get<IGameRepo>();
gameRepo.IsPaused.Sync += OnIsPaused;
gameRepo.DoubleExpTimeStart += OnDoubleExpTimeStart;
gameRepo.Ended += OnGameEnded;
});
OnDetach(() =>
{
var gameRepo = Get<IGameRepo>();
gameRepo.IsPaused.Sync -= OnIsPaused;
gameRepo.DoubleExpTimeStart -= OnDoubleExpTimeStart;
gameRepo.Ended -= OnGameEnded;
});
}
private void OnDoubleExpTimeStart(int lengthOfTimeInSeconds) => Output(new Output.DoubleExpTimeStart(lengthOfTimeInSeconds));
private void OnGameEnded() => Output(new Output.ShowLostScreen());
public void OnIsPaused(bool isPaused) => Output(new Output.SetPauseMode(isPaused));
}
}