加入部分咖啡豆素材
@ -20,6 +20,11 @@
|
|||||||
"NewspaperZombieNoPaperAttack":{"x":48, "width":92},
|
"NewspaperZombieNoPaperAttack":{"x":48, "width":92},
|
||||||
"NewspaperZombieLostHead":{"x":44, "width":96},
|
"NewspaperZombieLostHead":{"x":44, "width":96},
|
||||||
"NewspaperZombieLostHeadAttack":{"x":48, "width":92},
|
"NewspaperZombieLostHeadAttack":{"x":48, "width":92},
|
||||||
"NewspaperZombieDie":{"x":0, "width":100}
|
"NewspaperZombieDie":{"x":0, "width":100},
|
||||||
|
"DukyTubeZombie":{"x":55, "width":105},
|
||||||
|
"DukyTubeZombieAttack":{"x":55, "width":105},
|
||||||
|
"DukyTubeZombieDie":{"x":55, "width":105},
|
||||||
|
"DukyTubeZombieLostHead":{"x":55, "width":105},
|
||||||
|
"DukyTubeZombieSwim":{"x":55, "width":105}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4,7 +4,7 @@
|
|||||||
"shovel":1,
|
"shovel":1,
|
||||||
"spawn_zombies":"list",
|
"spawn_zombies":"list",
|
||||||
"zombie_list":[
|
"zombie_list":[
|
||||||
{"time":1000, "map_y":2, "name":"FootballZombie"},
|
{"time":1000, "map_y":2, "name":"DuckyTubeZombie"},
|
||||||
{"time":60000, "map_y":2, "name":"Zombie"}
|
{"time":60000, "map_y":2, "name":"Zombie"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_0.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_1.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_10.png
Normal file
|
After Width: | Height: | Size: 1010 B |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_11.png
Normal file
|
After Width: | Height: | Size: 991 B |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_12.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_13.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_14.png
Normal file
|
After Width: | Height: | Size: 810 B |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_15.png
Normal file
|
After Width: | Height: | Size: 615 B |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_16.png
Normal file
|
After Width: | Height: | Size: 201 B |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_2.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_3.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_4.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_5.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_6.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_7.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_8.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
resources/graphics/Plants/CoffeeBean/CoffeeBean_9.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
@ -4,7 +4,7 @@ from .. import constants as c
|
|||||||
|
|
||||||
|
|
||||||
class Zombie(pg.sprite.Sprite):
|
class Zombie(pg.sprite.Sprite):
|
||||||
def __init__(self, x, y, name, head_group=None, helmetHealth=0, helmetType2Health=0, bodyHealth=c.NORMAL_HEALTH + c.LOSTHEAD_HEALTH, damage=c.ZOMBIE_ATTACK_DAMAGE):
|
def __init__(self, x, y, name, head_group=None, helmetHealth=0, helmetType2Health=0, bodyHealth=c.NORMAL_HEALTH + c.LOSTHEAD_HEALTH, damage=c.ZOMBIE_ATTACK_DAMAGE, canSwim=False):
|
||||||
pg.sprite.Sprite.__init__(self)
|
pg.sprite.Sprite.__init__(self)
|
||||||
|
|
||||||
self.name = name
|
self.name = name
|
||||||
@ -575,3 +575,34 @@ class FootballZombie(Zombie):
|
|||||||
self.loadFrames(frame_list[i], name)
|
self.loadFrames(frame_list[i], name)
|
||||||
|
|
||||||
self.frames = self.helmet_walk_frames
|
self.frames = self.helmet_walk_frames
|
||||||
|
|
||||||
|
class DuckyTubeZombie(Zombie):
|
||||||
|
def __init__(self, x, y, head_group):
|
||||||
|
Zombie.__init__(self, x, y, c.DUCKY_TUBE_ZOMBIE, head_group, canSwim=True)
|
||||||
|
|
||||||
|
def loadImages(self):
|
||||||
|
self.walk_frames = []
|
||||||
|
self.swim_frames = []
|
||||||
|
self.attack_frames = []
|
||||||
|
self.losthead_walk_frames = []
|
||||||
|
self.losthead_attack_frames = []
|
||||||
|
self.die_frames = []
|
||||||
|
self.boomdie_frames = []
|
||||||
|
|
||||||
|
walk_name = self.name
|
||||||
|
swim_name = self.name + 'Swim'
|
||||||
|
attack_name = self.name + 'Attack'
|
||||||
|
losthead_walk_name = self.name + 'LostHead'
|
||||||
|
losthead_attack_name = self.name + 'LostHead'
|
||||||
|
die_name = self.name + 'Die'
|
||||||
|
boomdie_name = c.BOOMDIE
|
||||||
|
|
||||||
|
frame_list = [self.walk_frames, self.swim_frames, self.attack_frames, self.losthead_walk_frames,
|
||||||
|
self.losthead_attack_frames, self.die_frames, self.boomdie_frames]
|
||||||
|
name_list = [walk_name, swim_name, attack_name, losthead_walk_name,
|
||||||
|
losthead_attack_name, die_name, boomdie_name]
|
||||||
|
|
||||||
|
for i, name in enumerate(name_list):
|
||||||
|
self.loadFrames(frame_list[i], name)
|
||||||
|
|
||||||
|
self.frames = self.walk_frames
|
||||||
|
|||||||
@ -141,6 +141,9 @@ MAP_POOL_OFFSET_Y = 115
|
|||||||
MAP_ROOF_OFFSET_X = 35 # 暂时还不清楚数据
|
MAP_ROOF_OFFSET_X = 35 # 暂时还不清楚数据
|
||||||
MAP_ROOF_OFFSET_Y = 105 # 暂时还不清楚数据
|
MAP_ROOF_OFFSET_Y = 105 # 暂时还不清楚数据
|
||||||
|
|
||||||
|
# 泳池前端陆地部分
|
||||||
|
MAP_POOL_FRONT_X = 770
|
||||||
|
|
||||||
# 植物选择菜单栏、传送带菜单栏等类型设定
|
# 植物选择菜单栏、传送带菜单栏等类型设定
|
||||||
CHOOSEBAR_TYPE = 'choosebar_type'
|
CHOOSEBAR_TYPE = 'choosebar_type'
|
||||||
CHOOSEBAR_STATIC = 0
|
CHOOSEBAR_STATIC = 0
|
||||||
@ -277,6 +280,8 @@ BUCKETHEAD_ZOMBIE = 'BucketheadZombie'
|
|||||||
FLAG_ZOMBIE = 'FlagZombie'
|
FLAG_ZOMBIE = 'FlagZombie'
|
||||||
NEWSPAPER_ZOMBIE = 'NewspaperZombie'
|
NEWSPAPER_ZOMBIE = 'NewspaperZombie'
|
||||||
FOOTBALL_ZOMBIE = 'FootballZombie'
|
FOOTBALL_ZOMBIE = 'FootballZombie'
|
||||||
|
DUCKY_TUBE_ZOMBIE = 'DuckyTubeZombie'
|
||||||
|
|
||||||
BOOMDIE = 'BoomDie'
|
BOOMDIE = 'BoomDie'
|
||||||
|
|
||||||
# 对僵尸的攻击类型设置
|
# 对僵尸的攻击类型设置
|
||||||
|
|||||||
@ -657,6 +657,8 @@ class Level(tool.State):
|
|||||||
self.zombie_groups[map_y].add(zombie.NewspaperZombie(c.ZOMBIE_START_X + randint(-20, 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:
|
elif name == c.FOOTBALL_ZOMBIE:
|
||||||
self.zombie_groups[map_y].add(zombie.FootballZombie(c.ZOMBIE_START_X + randint(-20, 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))
|
||||||
|
elif name == c.DUCKY_TUBE_ZOMBIE:
|
||||||
|
self.zombie_groups[map_y].add(zombie.DuckyTubeZombie(c.ZOMBIE_START_X + randint(-20, 20) + hugeWaveMove, y, self.head_group))
|
||||||
|
|
||||||
# 能否种植物的判断:
|
# 能否种植物的判断:
|
||||||
# 先判断位置是否合法 isValid(map_x, map_y)
|
# 先判断位置是否合法 isValid(map_x, map_y)
|
||||||
|
|||||||