微调数据
This commit is contained in:
parent
17d399216b
commit
fc0ac1a54d
@ -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'
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user