diff --git a/source/component/zombie.py b/source/component/zombie.py index 11af0c9..4b5a869 100755 --- a/source/component/zombie.py +++ b/source/component/zombie.py @@ -80,6 +80,8 @@ class Zombie(pg.sprite.Sprite): self.health -= (self.current_time - self.losthead_timer) / 40 self.losthead_timer = self.current_time return False + else: + return False def walking(self): if self.checkToDie(self.losthead_walk_frames): diff --git a/source/state/level.py b/source/state/level.py index bce5b33..9b0cf10 100644 --- a/source/state/level.py +++ b/source/state/level.py @@ -828,11 +828,12 @@ class Level(tool.State): self.shovel_rect.centery = y # 铲子接近植物时会高亮提示 map_x, map_y = self.map.getMapIndex(x, y) + surface.blit(self.shovel, self.shovel_rect) for i in self.plant_groups[map_y]: if (x >= i.rect.x and x <= i.rect.right and y >= i.rect.y and y <= i.rect.bottom): i.highlightTime = self.current_time - surface.blit(self.shovel, self.shovel_rect) + return def drawZombieFreezeTrap(self, i, surface): for zombie in self.zombie_groups[i]: