summaryrefslogtreecommitdiff
path: root/Assets/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts')
-rw-r--r--Assets/Scripts/UI/UIBinding.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Assets/Scripts/UI/UIBinding.cs b/Assets/Scripts/UI/UIBinding.cs
index b84f307..9830b03 100644
--- a/Assets/Scripts/UI/UIBinding.cs
+++ b/Assets/Scripts/UI/UIBinding.cs
@@ -12,6 +12,9 @@ namespace UI
[Range(0, 1)] public float player2ScorePercent;
public TMP_Text timeText;
+ public TMP_Text player1ScoreText;
+ public TMP_Text player2ScoreText;
+ public TMP_Text questionText;
public Image player1ScoreDisplay;
public Image player2ScoreDisplay;
@@ -29,6 +32,13 @@ namespace UI
// 更新进度条
player1ScoreDisplay.fillAmount = targetPlayer1Amount;
player2ScoreDisplay.fillAmount = targetPlayer2Amount;
+
+ // 更新玩家分数显示
+ player1ScoreText.text = progress.player1Score.ToString();
+ player2ScoreText.text = progress.player2Score.ToString();
+
+ // 更新问题显示
+ questionText.text = progress.questionPlayer.currentQuestion.QuestionText;
}
}
}