From 80622cdde0c46da14fa93f5b2022d9e557149cd9 Mon Sep 17 00:00:00 2001 From: 206530222 <2748970477@qq.com> Date: Tue, 22 Jun 2021 12:40:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'scoreboard.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scoreboard.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scoreboard.py b/scoreboard.py index 73adad8..40a88c8 100644 --- a/scoreboard.py +++ b/scoreboard.py @@ -49,4 +49,10 @@ class Scoreboard: # """将最高得分放在屏幕顶部中央""" self.high_score_rect = self.high_score_image.get_rect() self.high_score_rect.centerx = self.screen_rect.centerx - self.high_score_rect.top = self.score_rect.top \ No newline at end of file + self.high_score_rect.top = self.score_rect.top + + def check_high_score(self): + #"""检查是否诞生了新的最高得分""" + if self.stats.score > self.stats.high_score: + self.stats.high_score = self.stats.score + self.prep_score() \ No newline at end of file