本文整理汇总了Python中level.Level.respawn方法的典型用法代码示例。如果您正苦于以下问题:Python Level.respawn方法的具体用法?Python Level.respawn怎么用?Python Level.respawn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类level.Level
的用法示例。
在下文中一共展示了Level.respawn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: elif
# 需要导入模块: from level import Level [as 别名]
# 或者: from level.Level import respawn [as 别名]
player.mov = 0
elif event.key == K_d and player.mov == PLAYER_SPEED:
player.mov = 0
elif event.type == MOUSEMOTION:
mousex, mousey = event.pos
#Update
player.update()
level.update(player, camera)
camera.update(player)
lava.update(dt, player, level, camera)
if (lava.state != ENDED and player.collideWith(lava)):
player.respawn()
level.respawn()
lava.respawn()
if (lava.state == EMERGING):
if (sound_manager.playing_background_music and sound_manager.music_playing == NORMAL_MUSIC_PATH):
sound_manager.stop_background_music()
elif(not sound_manager.playing_background_music):
sound_manager.play_background_music(LAVA_MUSIC_PATH)
if (sound_manager.playing_background_music and sound_manager.music_playing == LAVA_MUSIC_PATH and lava.state == ENDED):
configuration.save_score(player.score)
sound_manager.stop_background_music()
if (player_score != player.score):
sound_manager.play_effect(MONEY_SOUND_PATH)