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