本文整理汇总了Python中arena.Arena.stop方法的典型用法代码示例。如果您正苦于以下问题:Python Arena.stop方法的具体用法?Python Arena.stop怎么用?Python Arena.stop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类arena.Arena
的用法示例。
在下文中一共展示了Arena.stop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Main
# 需要导入模块: from arena import Arena [as 别名]
# 或者: from arena.Arena import stop [as 别名]
#.........这里部分代码省略.........
self.levelSelection = LevelSelection()
self.koScreen = KoScreen()
self.hud = Hud()
self.menuMusic = loader.loadMusic("assets/audio/menuMusic.ogg")
self.menuMusic.setLoop(True)
self.fightMusic = loader.loadMusic("assets/audio/fightMusic.ogg")
self.fightMusic.setLoop(True)
base.audio3d = Audio3DManager(base.sfxManagerList[0], camera)
#
# Event handling
#
self.accept("escape", self.__escape)
#
# Start with the menu
#
self.request("Menu")
#
# FSM PART
#
def enterMenu(self):
show_cursor()
self.accept("Menu-Start", self.request, ["CharSelection"])
self.accept("Menu-Credits", self.request, ["Credits"])
self.accept("Menu-Quit", self.quit)
self.ignore("KoScreen-Back")
self.koScreen.hide()
self.menu.show()
if self.menuMusic.status() != AudioSound.PLAYING:
self.menuMusic.play()
if self.fightMusic.status() == AudioSound.PLAYING:
self.fightMusic.stop()
def exitMenu(self):
self.ignore("Menu-Start")
self.ignore("Menu-Credits")
self.ignore("Menu-Quit")
self.menu.hide()
def enterCredits(self):
self.accept("Credits-Back", self.request, ["Menu"])
self.koScreen.hide()
self.credits.show()
def exitCredits(self):
self.ignore("Credits-Back")
self.credits.hide()
def enterCharSelection(self):
self.accept("CharSelection-Back", self.request, ["Menu"])
self.accept("CharSelection-Start", self.request, ["LevelSelection"])
self.charSelection.show()
def exitCharSelection(self):
self.ignore("CharSelection-Start")
self.ignore("CharSelection-Back")
self.charSelection.hide()
self.selectedChar1 = self.charSelection.selectedCharacter1
self.selectedChar2 = self.charSelection.selectedCharacter2
def enterLevelSelection(self):
self.accept("LevelSelection-Back", self.request, ["CharSelection"])
self.accept("LevelSelection-Start", self.request, ["Game"])
self.levelSelection.show()