def end_game(self):
self.game_state = GAME_DEAD
self.player.velocity = Point(0, 0)
death_loc = self.player.frame.center()
death_loc.y = max(death_loc.y, 80)
self.player.die()
del self.player
self.player = None
score = int(self.climb / 10)
if self.high_scores.is_high_score(player_name, score):
self.smoke_special.frame.center(death_loc)
self.smoke_special.configure(frame_count=0, is_done=False)
#console.hud_alert('New high score!') # for debugging purposes
run_in_thread(high_score_sounds)
fmt = 'Congratulations {}:\nYou have a new high score!'
self.high_score_msg = fmt.format(player_name)
else:
self.smoke_normal.frame.center(death_loc)
self.smoke_normal.configure(frame_count=0, is_done=False)
评论列表
文章目录