增加缠绕水草音效
This commit is contained in:
parent
69d9020d3f
commit
d96ccf5fa8
@ -156,6 +156,7 @@ nuitka --mingw64 --standalone --onefile --show-progress --show-memory --output-d
|
|||||||
* 从地面刺伤
|
* 从地面刺伤
|
||||||
* 已实现
|
* 已实现
|
||||||
* 缠绕与拖拽
|
* 缠绕与拖拽
|
||||||
|
* 自0.7.5.0已实现
|
||||||
* 吞噬
|
* 吞噬
|
||||||
* 已实现
|
* 已实现
|
||||||
* 特殊
|
* 特殊
|
||||||
|
|||||||
BIN
resources/sound/tangleKelpDrag.ogg
Normal file
BIN
resources/sound/tangleKelpDrag.ogg
Normal file
Binary file not shown.
@ -1292,6 +1292,8 @@ class TangleKlep(Plant):
|
|||||||
self.changeFrames(self.splash_frames)
|
self.changeFrames(self.splash_frames)
|
||||||
self.zombie_group.remove(self.attack_zombie)
|
self.zombie_group.remove(self.attack_zombie)
|
||||||
self.attack_zombie.kill()
|
self.attack_zombie.kill()
|
||||||
|
# 播放拖拽音效
|
||||||
|
pg.mixer.Sound(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))) ,"resources", "sound", "tangleKelpDrag.ogg")).play()
|
||||||
# 这里必须用elif排除尚未进入splash阶段,以免误触
|
# 这里必须用elif排除尚未进入splash阶段,以免误触
|
||||||
elif (self.frame_index + 1) >= self.frame_num:
|
elif (self.frame_index + 1) >= self.frame_num:
|
||||||
self.health = 0
|
self.health = 0
|
||||||
@ -1023,7 +1023,7 @@ class Level(tool.State):
|
|||||||
if ((pg.sprite.collide_circle_ratio(0.6)(zombie, plant)) or
|
if ((pg.sprite.collide_circle_ratio(0.6)(zombie, plant)) or
|
||||||
(abs(zombie.rect.centerx - x) <= plant.explode_x_range)):
|
(abs(zombie.rect.centerx - x) <= plant.explode_x_range)):
|
||||||
zombie.setDamage(1800, damageType=c.ZOMBIE_RANGE_DAMAGE)
|
zombie.setDamage(1800, damageType=c.ZOMBIE_RANGE_DAMAGE)
|
||||||
elif plant.name != c.WALLNUTBOWLING:
|
elif plant.name not in {c.WALLNUTBOWLING, c.TANGLEKLEP}:
|
||||||
# 触发植物死亡音效
|
# 触发植物死亡音效
|
||||||
pg.mixer.Sound(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))) ,"resources", "sound", "plantDie.ogg")).play()
|
pg.mixer.Sound(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))) ,"resources", "sound", "plantDie.ogg")).play()
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user