From 0ad4597eefebaf3002290eb7b17436b0fda0f01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Wed, 18 May 2022 23:00:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=83=B5=E5=B0=B8=E8=A2=AB?= =?UTF-8?q?=E5=B0=8F=E6=8E=A8=E8=BD=A6=E6=9D=80=E6=AD=BB=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/component/zombie.py | 4 ++-- source/state/level.py | 2 +- source/tool.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/component/zombie.py b/source/component/zombie.py index 9081fb8..abc38f5 100755 --- a/source/component/zombie.py +++ b/source/component/zombie.py @@ -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) diff --git a/source/state/level.py b/source/state/level.py index c98af4e..47a9abd 100644 --- a/source/state/level.py +++ b/source/state/level.py @@ -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 diff --git a/source/tool.py b/source/tool.py index 9becdce..4961fd2 100755 --- a/source/tool.py +++ b/source/tool.py @@ -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')