From a79b8cff71e0a6819498e61cad800910bb89eb47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Thu, 5 May 2022 11:13:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E4=B8=80=E6=AD=A5=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=AD=85=E6=83=91=E7=9A=84=E5=83=B5=E5=B0=B8=E5=9C=A8=E6=B0=B4?= =?UTF-8?q?=E6=B1=A0=E4=B8=AD=E7=9A=84=E8=A1=8C=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/component/zombie.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/component/zombie.py b/source/component/zombie.py index 41e5798..1edb011 100755 --- a/source/component/zombie.py +++ b/source/component/zombie.py @@ -145,8 +145,7 @@ class Zombie(pg.sprite.Sprite): self.helmetType2 = False else: self.changeFrames(self.helmet_walk_frames) - # 尚未进入水池,或被魅惑的僵尸已经走出水池 - else: + elif self.is_hypno and self.rect.right > c.MAP_POOL_FRONT_X + 55: # 常数拟合暂时缺乏检验 if self.swimming: self.changeFrames(self.walk_frames) if self.helmet: @@ -162,6 +161,14 @@ class Zombie(pg.sprite.Sprite): elif self.swimming: # 游泳状态需要改为步行 self.changeFrames(self.helmet_walk_frames) self.swimming = False + # 尚未进入水池 + else: + if self.helmetHealth <= 0 and self.helmet: + self.changeFrames(self.walk_frames) + self.helmet = False + if self.helmetType2Health <= 0 and self.helmetType2: + self.changeFrames(self.walk_frames) + self.helmetType2 = False # 不能游泳的一般僵尸 else: if self.helmetHealth <= 0 and self.helmet: