From dbb013f389961fbe53b522d99af082f4634dce8b Mon Sep 17 00:00:00 2001 From: xjyribro Date: Sun, 21 Apr 2024 21:53:08 +0800 Subject: [PATCH] fix logic for changing day --- lib/game/ui/hud/clock.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/game/ui/hud/clock.dart b/lib/game/ui/hud/clock.dart index a3c3e97..bb8a620 100644 --- a/lib/game/ui/hud/clock.dart +++ b/lib/game/ui/hud/clock.dart @@ -118,14 +118,14 @@ class ClockComponent extends HudMarginComponent { if (_seconds > gameMinToRealSecond) { _seconds = 0; _gameMins += 1; - _timeCheck(); - _respawnRubbishCheck(); if (_gameMins > minsInADay) { _gameMins = 0; _game.gameStateBloc.add(const SetMinsInGame(0)); } else { _game.gameStateBloc.add(const AddOneMin()); } + _timeCheck(); + _respawnRubbishCheck(); } final int hours = (_gameMins / 60).floor(); final int mins = _gameMins % 60;