From d48260636a40aa7bf60219d0f275d34dda648825 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, 4 May 2022 22:21:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=8F=E5=B0=91=E5=8F=98=E9=87=8F=E5=90=8D?= =?UTF-8?q?=E6=AD=A7=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/component/plant.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/component/plant.py b/source/component/plant.py index 0f84e09..2acb333 100755 --- a/source/component/plant.py +++ b/source/component/plant.py @@ -651,12 +651,12 @@ class PotatoMine(Plant): class Squash(Plant): - def __init__(self, x, y, mapObjSet): + def __init__(self, x, y, mapPlantsSet): Plant.__init__(self, x, y, c.SQUASH, c.PLANT_HEALTH, None) self.orig_pos = (x, y) self.aim_timer = 0 self.squashing = False - self.mapObjSet = mapObjSet + self.mapPlantsSet = mapPlantsSet def loadImages(self, name, scale): self.idle_frames = [] @@ -707,7 +707,7 @@ class Squash(Plant): if self.canAttack(zombie): zombie.setDamage(1800, damageType=c.ZOMBIE_RANGE_DAMAGE) self.health = 0 # 避免僵尸在原位啃食 - self.mapObjSet.remove(c.SQUASH) + self.mapPlantsSet.remove(c.SQUASH) self.kill() elif self.aim_timer == 0: self.aim_timer = self.current_time