修复魅惑菇的bug

This commit is contained in:
星外之神 2022-04-05 23:14:23 +08:00
parent 09781d497c
commit 0840bb5fda
4 changed files with 3 additions and 4 deletions

View File

@ -88,7 +88,6 @@ nuitka --mingw --standalone --onefile --show-progress --show-memory --output-dir
* 修复已经死亡的僵尸会触发大嘴花、土豆雷甚至小推车的问题
* 用蓝色滤镜标识冷冻的僵尸
* 修复暂停游戏时仍在计时的bug
* 修复魅惑菇的bug
## 截屏

View File

@ -215,7 +215,7 @@ class Plant(pg.sprite.Sprite):
if not zombie.lostHead:
self.health -= damage
self.hit_timer = self.current_time
if self.health == 0:
if (self.health == 0) or (self.name == c.HYPNOSHROOM and self.state != c.SLEEP):
self.kill_zombie = zombie
def getPosition(self):

View File

@ -555,7 +555,7 @@ class Level(tool.State):
zombie.setAttack(plant)
for hypno_zombie in self.hypno_zombie_groups[i]:
if hypno_zombie.health <= 0:
if hypno_zombie.health < 70:
continue
zombie_list = pg.sprite.spritecollide(hypno_zombie,
self.zombie_groups[i], False,collided_func)

View File

@ -35,7 +35,7 @@ class Control():
self.screen = pg.display.get_surface()
self.done = False
self.clock = pg.time.Clock() # 创建一个对象来帮助跟踪时间
self.fps = 60
self.fps = 30
self.keys = pg.key.get_pressed()
self.mouse_pos = None
self.mouse_click = [False, False] # value:[left mouse click, right mouse click]