From fc0ac1a54d30d9c9c166851cc1ae8a50fb83e057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Mon, 2 May 2022 19:43:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/constants.py | 2 +- source/state/level.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/constants.py b/source/constants.py index cdd7bc1..f11aa96 100755 --- a/source/constants.py +++ b/source/constants.py @@ -302,7 +302,7 @@ ATTACK_INTERVAL = 500 ZOMBIE_WALK_INTERVAL = 60 # 僵尸步行间隔 # 僵尸生成位置 -ZOMBIE_START_X = SCREEN_WIDTH + 20 # 场宽度不一样,用于拟合 +ZOMBIE_START_X = SCREEN_WIDTH + 25 # 场宽度不一样,用于拟合 # 状态类型 IDLE = 'idle' diff --git a/source/state/level.py b/source/state/level.py index 9443995..500b57a 100644 --- a/source/state/level.py +++ b/source/state/level.py @@ -645,17 +645,17 @@ class Level(tool.State): x, y = self.map.getMapGridPos(0, map_y) # 新增的僵尸也需要在这里声明 if name == c.NORMAL_ZOMBIE: - self.zombie_groups[map_y].add(zombie.NormalZombie(c.ZOMBIE_START_X + randint(-10, 20) + hugeWaveMove, y, self.head_group)) + self.zombie_groups[map_y].add(zombie.NormalZombie(c.ZOMBIE_START_X + randint(-20, 20) + hugeWaveMove, y, self.head_group)) elif name == c.CONEHEAD_ZOMBIE: - self.zombie_groups[map_y].add(zombie.ConeHeadZombie(c.ZOMBIE_START_X + randint(-10, 20) + hugeWaveMove, y, self.head_group)) + self.zombie_groups[map_y].add(zombie.ConeHeadZombie(c.ZOMBIE_START_X + randint(-20, 20) + hugeWaveMove, y, self.head_group)) elif name == c.BUCKETHEAD_ZOMBIE: - self.zombie_groups[map_y].add(zombie.BucketHeadZombie(c.ZOMBIE_START_X + randint(-10, 20) + hugeWaveMove, y, self.head_group)) + self.zombie_groups[map_y].add(zombie.BucketHeadZombie(c.ZOMBIE_START_X + randint(-20, 20) + hugeWaveMove, y, self.head_group)) elif name == c.FLAG_ZOMBIE: self.zombie_groups[map_y].add(zombie.FlagZombie(c.ZOMBIE_START_X, y, self.head_group)) elif name == c.NEWSPAPER_ZOMBIE: - self.zombie_groups[map_y].add(zombie.NewspaperZombie(c.ZOMBIE_START_X + randint(-10, 20) + hugeWaveMove, y, self.head_group)) + self.zombie_groups[map_y].add(zombie.NewspaperZombie(c.ZOMBIE_START_X + randint(-20, 20) + hugeWaveMove, y, self.head_group)) elif name == c.FOOTBALL_ZOMBIE: - self.zombie_groups[map_y].add(zombie.FootballZombie(c.ZOMBIE_START_X + randint(-10, 20) + hugeWaveMove, y, self.head_group)) + self.zombie_groups[map_y].add(zombie.FootballZombie(c.ZOMBIE_START_X + randint(-20, 20) + hugeWaveMove, y, self.head_group)) # 能否种植物的判断: # 先判断位置是否合法 isValid(map_x, map_y)