去除非植物类“死亡”时的音效

This commit is contained in:
星外之神 2022-05-14 16:34:09 +08:00
parent 9260c88e5a
commit 92beb00dff

View File

@ -1232,7 +1232,9 @@ class Level(tool.State):
# 注意这里是在描述墓碑而非墓碑吞噬者
elif targetPlant.name == c.GRAVE:
self.graveSet.remove((map_x, map_y))
elif targetPlant.name not in {c.WALLNUTBOWLING, c.TANGLEKLEP}:
elif targetPlant.name not in { c.WALLNUTBOWLING, c.TANGLEKLEP,
c.ICE_FROZEN_PLOT, c.HOLE,
c.GRAVE}:
# 触发植物死亡音效
pg.mixer.Sound(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))) ,"resources", "sound", "plantDie.ogg")).play()
else: