CloudJump2.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:pythonista-scripts 作者: khilnani 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号