修复僵尸在用铲子移除植物后还在原位啃食的bug
This commit is contained in:
parent
b6e0961d2b
commit
4ed1f0a7ef
@ -3,11 +3,6 @@
|
|||||||
"init_sun_value":5000,
|
"init_sun_value":5000,
|
||||||
"shovel":1,
|
"shovel":1,
|
||||||
"zombie_list":[
|
"zombie_list":[
|
||||||
{"time":1000, "map_y":2, "name":"BucketheadZombie"},
|
|
||||||
{"time":1000, "map_y":2, "name":"BucketheadZombie"},
|
|
||||||
{"time":1000, "map_y":2, "name":"Zombie"},
|
|
||||||
{"time":1000, "map_y":2, "name":"Zombie"},
|
|
||||||
{"time":1000, "map_y":2, "name":"Zombie"},
|
|
||||||
{"time":1000, "map_y":2, "name":"Zombie"},
|
{"time":1000, "map_y":2, "name":"Zombie"},
|
||||||
{"time":2000, "map_y":2, "name":"BucketheadZombie"},
|
{"time":2000, "map_y":2, "name":"BucketheadZombie"},
|
||||||
{"time":3000, "map_y":2, "name":"BucketheadZombie"},
|
{"time":3000, "map_y":2, "name":"BucketheadZombie"},
|
||||||
|
|||||||
@ -612,6 +612,8 @@ class Level(tool.State):
|
|||||||
_, map_y = self.map.getMapIndex(zombie.rect.centerx, zombie.rect.bottom)
|
_, map_y = self.map.getMapIndex(zombie.rect.centerx, zombie.rect.bottom)
|
||||||
self.zombie_groups[map_y].remove(zombie)
|
self.zombie_groups[map_y].remove(zombie)
|
||||||
self.hypno_zombie_groups[map_y].add(zombie)
|
self.hypno_zombie_groups[map_y].add(zombie)
|
||||||
|
# 避免僵尸在用铲子移除植物后还在原位啃食
|
||||||
|
plant.health = 0
|
||||||
plant.kill()
|
plant.kill()
|
||||||
|
|
||||||
def checkPlant(self, plant, i):
|
def checkPlant(self, plant, i):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user