diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index 72bcbfa..caa465c 100644 --- a/src/game.cpp +++ b/src/game.cpp | |||
@@ -16,6 +16,7 @@ Game::Game(std::mt19937& rng, Muxer& muxer, Renderer& renderer) : | |||
16 | sign(renderer.getFont()) | 16 | sign(renderer.getFont()) |
17 | { | 17 | { |
18 | losePopLampTimer.accumulate(losePopLampTimer.getDt()); | 18 | losePopLampTimer.accumulate(losePopLampTimer.getDt()); |
19 | initialFade.start(1000); | ||
19 | 20 | ||
20 | do { | 21 | do { |
21 | loadMap(); | 22 | loadMap(); |
@@ -846,6 +847,19 @@ void Game::updatePlaying(size_t frameTime) { | |||
846 | 847 | ||
847 | switch (losing) | 848 | switch (losing) |
848 | { | 849 | { |
850 | case LoseState::NewGame: | ||
851 | { | ||
852 | if (!startedMusic) { | ||
853 | startedMusic = true; | ||
854 | muxer.startMusic(); | ||
855 | } | ||
856 | initialFade.tick(frameTime); | ||
857 | if (initialFade.isComplete()) { | ||
858 | losing = LoseState::None; | ||
859 | } | ||
860 | break; | ||
861 | } | ||
862 | |||
849 | case LoseState::None: | 863 | case LoseState::None: |
850 | { | 864 | { |
851 | if (moving) { | 865 | if (moving) { |