From b48f888558ddfae0950a0e21e5abb816db73ece8 Mon Sep 17 00:00:00 2001 From: tiendat3699 <96950844+tiendat3699@users.noreply.github.com> Date: Tue, 18 Jun 2024 15:53:46 +0700 Subject: [PATCH] chore --- assets/_Game/Scripts/UI/GameOverPanel.ts | 1 + assets/_Game/Scripts/UI/TimeUI.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/assets/_Game/Scripts/UI/GameOverPanel.ts b/assets/_Game/Scripts/UI/GameOverPanel.ts index 12d392c..9cbd329 100644 --- a/assets/_Game/Scripts/UI/GameOverPanel.ts +++ b/assets/_Game/Scripts/UI/GameOverPanel.ts @@ -115,6 +115,7 @@ export class GameOverPanel extends Component { const target = this.yourScore.node.getWorldPosition(); let duration = 0; for (let i = 0; i < items; i++) { + if (this._clicked) return; score += x; duration = this._starSpeedCurve.evaluate(i / items - 1); score = score > totalScore ? totalScore : score; diff --git a/assets/_Game/Scripts/UI/TimeUI.ts b/assets/_Game/Scripts/UI/TimeUI.ts index ab40861..34f4543 100644 --- a/assets/_Game/Scripts/UI/TimeUI.ts +++ b/assets/_Game/Scripts/UI/TimeUI.ts @@ -39,6 +39,10 @@ export class TimeUI extends Component { this._timeLabel.string = this._gameTime.toString(); break; case GameState.Playing: + AudioManager.stopSfx(this._countDownSound); + Tween.stopAllByTarget(this._timeIcon); + this._fill.color = Color.GREEN; + this._timeLabel.color = Color.WHITE; break; case GameState.GameOver: AudioManager.stopSfx(this._countDownSound);