更改僵尸被小推车杀死时的动画

This commit is contained in:
星外之神 2022-05-18 23:00:02 +08:00
parent 8ed01975dc
commit 0ad4597eef
3 changed files with 4 additions and 4 deletions

View File

@ -959,7 +959,7 @@ class Zomboni(Zombie):
self.plant_group = plant_group
self.map = map
self.IceFrozenPlot = IceFrozenPlot
self.die_animate_interval = 100
self.die_animate_interval = 70
self.boomDie_animate_interval = 150
# 播放冰车生成音效
pg.mixer.Sound(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))) ,"resources", "sound", "zomboni.ogg")).play()
@ -1023,7 +1023,7 @@ class Zomboni(Zombie):
plant.health -= 8000
# 造冰
mapX, mapY = self.map.getMapIndex(self.rect.right - 20, self.rect.bottom)
mapX, mapY = self.map.getMapIndex(self.rect.right - 40, self.rect.bottom)
if 0 <= mapX < c.GRID_X_LEN:
if c.ICE_FROZEN_PLOT not in self.map.map[mapY][mapX]:
x, y = self.map.getMapGridPos(mapX, mapY)

View File

@ -1143,7 +1143,7 @@ class Level(tool.State):
self.cars[i].setWalk()
if zombie.rect.centerx <= self.cars[i].rect.x:
zombie.health = 0
zombie.kill()
# zombie.kill()
if self.cars[i].dead:
self.cars[i] = None

View File

@ -97,7 +97,7 @@ class Control():
while not self.done:
self.event_loop()
self.update()
pg.display.update()
pg.display.flip()
self.clock.tick(self.fps)
print('game over')