增加帮助菜单打开音效

This commit is contained in:
wszqkzqk 2022-08-02 22:29:23 +08:00
parent bf3fdc08b9
commit 6ae7007bb9
3 changed files with 2 additions and 0 deletions

BIN
resources/sound/helpScreen.ogg Executable file

Binary file not shown.

View File

@ -660,6 +660,7 @@ def _getSound(filename):
# 所有音效的元组,用一波海象算子表达(>= python 3.8),免得要维护两个
SOUNDS = ( # 程序交互等
SOUND_TAPPING_CARD := _getSound("tap.ogg"),
SOUND_HELP_SCREEN := _getSound("helpScreen.ogg"),
# 植物
SOUND_FIREPEA_EXPLODE := _getSound("firepea.ogg"),
SOUND_BULLET_EXPLODE := _getSound("bulletExplode.ogg"),

View File

@ -223,6 +223,7 @@ class HelpScreen(tool.State):
self.setupImage()
pg.display.set_caption("pypvz: 帮助")
pg.mixer.music.stop()
c.SOUND_HELP_SCREEN.play()
def setupImage(self):
# 主体