From 8344c2e12186860d37c28cdda2b34e70e1429ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Fri, 22 Apr 2022 15:42:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9D=A1=E8=8E=B2=E8=B4=B4?= =?UTF-8?q?=E5=9B=BE=E9=9D=A0=E4=B8=8A=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/component/plant.py | 1 - source/constants.py | 2 +- source/state/level.py | 9 +++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/component/plant.py b/source/component/plant.py index dd4d0d5..828d161 100755 --- a/source/component/plant.py +++ b/source/component/plant.py @@ -625,7 +625,6 @@ class Squash(Plant): if self.canAttack(zombie): zombie.setDamage(1800, damageType=c.ZOMBIE_RANGE_DAMAGE) self.health = 0 # 避免僵尸在原位啃食 - print(self.orig_pos) self.mapObjSet.remove(c.SQUASH) self.kill() elif self.aim_timer == 0: diff --git a/source/constants.py b/source/constants.py index 99c37a9..f66144c 100755 --- a/source/constants.py +++ b/source/constants.py @@ -1,4 +1,4 @@ -START_LEVEL_NUM = 0 +START_LEVEL_NUM = 1 START_LITTLE_GAME_NUM = 1 ORIGINAL_CAPTION = 'pypvz' diff --git a/source/state/level.py b/source/state/level.py index 4259c81..20e97bd 100644 --- a/source/state/level.py +++ b/source/state/level.py @@ -564,8 +564,13 @@ class Level(tool.State): image.set_alpha(128) self.hint_image = image self.hint_rect = image.get_rect() - self.hint_rect.centerx = pos[0] - self.hint_rect.bottom = pos[1] + # 花盆、睡莲图片应当下移一些 + if self.plant_name in {c.LILYPAD, '花盆(未实现)'}: + self.hint_rect.centerx = pos[0] + self.hint_rect.bottom = pos[1] + 25 + else: + self.hint_rect.centerx = pos[0] + self.hint_rect.bottom = pos[1] self.hint_plant = True else: self.hint_plant = False