From 911ab88c383742a19ac47567552d565a7408435d 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, 11 May 2022 20:08:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=A7=E5=98=B4=E8=8A=B1?= =?UTF-8?q?=E8=83=BD=E6=94=BB=E5=87=BB=E7=9A=84=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/data/map/level_0.json | 4 ++-- source/component/plant.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/data/map/level_0.json b/resources/data/map/level_0.json index dc35859..10ce319 100644 --- a/resources/data/map/level_0.json +++ b/resources/data/map/level_0.json @@ -14,8 +14,8 @@ {"time":7000, "map_y":4, "name":"ScreenDoorZombie"}, {"time":8000, "map_y":4, "name":"ScreenDoorZombie"}, {"time":0, "map_y":1, "name":"NewspaperZombie"}, - {"time":3000, "map_y":0, "name":"PoleVaultingZombie"}, - {"time":0, "map_y":0, "name":"FootballZombie"}, + {"time":0, "map_y":0, "name":"PoleVaultingZombie"}, + {"time":6000, "map_y":0, "name":"FootballZombie"}, {"time":0, "map_y":2, "name":"ConeheadDuckyTubeZombie"}, {"time":80000, "map_y":2, "name":"ConeheadDuckyTubeZombie"} ] diff --git a/source/component/plant.py b/source/component/plant.py index 87f3444..c34015e 100755 --- a/source/component/plant.py +++ b/source/component/plant.py @@ -612,7 +612,7 @@ class Chomper(Plant): if (zombie.name in {c.POLE_VAULTING_ZOMBIE}) and (not zombie.jumped): return False elif (self.state == c.IDLE and zombie.state != c.DIGEST and - self.rect.x <= zombie.rect.right - 10 and (not zombie.lostHead) and + self.rect.x <= zombie.rect.centerx and (not zombie.lostHead) and (self.rect.x + c.GRID_X_SIZE*2.6 >= zombie.rect.centerx)): return True return False