更新 'scoreboard.py'
This commit is contained in:
parent
911382b488
commit
80622cdde0
|
@ -49,4 +49,10 @@ class Scoreboard:
|
||||||
# """将最高得分放在屏幕顶部中央"""
|
# """将最高得分放在屏幕顶部中央"""
|
||||||
self.high_score_rect = self.high_score_image.get_rect()
|
self.high_score_rect = self.high_score_image.get_rect()
|
||||||
self.high_score_rect.centerx = self.screen_rect.centerx
|
self.high_score_rect.centerx = self.screen_rect.centerx
|
||||||
self.high_score_rect.top = self.score_rect.top
|
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()
|
Loading…
Reference in New Issue