Skip to content

Commit

Permalink
fix: reset global config if restart the game, branch win
Browse files Browse the repository at this point in the history
  • Loading branch information
HangX-Ma committed Jan 12, 2024
1 parent e3d76b7 commit 54bddc1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/dino/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ void GameState::reset()
obstacle_.reset();
clouds_.reset();
score_.reset();
// restore global config
render_cfg_.game_speed = 12;
render_cfg_.background_color = lgfx::colors::TFT_WHITE;
render_cfg_.prev_background_color = lgfx::colors::TFT_BLACK;
}

} // namespace dino

0 comments on commit 54bddc1

Please # to comment.