From cf6aab5cdabce3716f6fc6f81ff55b36c41a9c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Tue, 3 May 2022 14:20:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E5=BD=93=E7=BC=A9=E7=9F=AD=E9=A6=96?= =?UTF-8?q?=E6=AC=A1=E6=94=BB=E5=87=BB=E9=97=B4=E9=9A=94=E7=9A=84=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/component/zombie.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/component/zombie.py b/source/component/zombie.py index bdd8511..0513b7d 100755 --- a/source/component/zombie.py +++ b/source/component/zombie.py @@ -309,7 +309,8 @@ class Zombie(pg.sprite.Sprite): self.prey = prey # prey can be plant or other zombies self.prey_is_plant = is_plant self.state = c.ATTACK - self.attack_timer = self.current_time + # 首次攻击间隔的延迟时间应当适当缩短 + self.attack_timer = self.current_time - c.ATTACK_INTERVAL * self.getAttackTimeRatio() self.animate_interval = self.attack_animate_interval if self.helmet or self.helmetType2: # 这里暂时没有考虑同时有两种防具的僵尸