修复睡莲贴图靠上的bug

This commit is contained in:
星外之神 2022-04-22 15:42:09 +08:00
parent b78e97b2b1
commit 8344c2e121
3 changed files with 8 additions and 4 deletions

View File

@ -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:

View File

@ -1,4 +1,4 @@
START_LEVEL_NUM = 0
START_LEVEL_NUM = 1
START_LITTLE_GAME_NUM = 1
ORIGINAL_CAPTION = 'pypvz'

View File

@ -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