掉头僵尸假攻击不再触发植物高亮
This commit is contained in:
parent
45ff017943
commit
f057771c60
@ -108,7 +108,7 @@ class Zombie(pg.sprite.Sprite):
|
||||
self.helmetType2 = False
|
||||
if self.name == c.NEWSPAPER_ZOMBIE:
|
||||
self.speed = 2.5
|
||||
if (self.current_time - self.attack_timer) > (c.ATTACK_INTERVAL * self.getAttackTimeRatio()):
|
||||
if ((self.current_time - self.attack_timer) > (c.ATTACK_INTERVAL * self.getAttackTimeRatio())) and not self.lostHead:
|
||||
if self.prey.health > 0:
|
||||
if self.prey_is_plant:
|
||||
self.prey.setDamage(self.damage, self)
|
||||
|
||||
@ -23,13 +23,12 @@ class Level(tool.State):
|
||||
# 默认显然不用显示菜单
|
||||
self.showLittleMenu = False
|
||||
|
||||
# 导入地图参数
|
||||
self.loadMap()
|
||||
self.setupBackground()
|
||||
self.initState()
|
||||
|
||||
# 可以给map加一个地图类型参数
|
||||
self.map = map.Map(self.map_data[c.BACKGROUND_TYPE])
|
||||
self.map_y_len = self.map.height
|
||||
self.setupBackground()
|
||||
self.initState()
|
||||
|
||||
def loadMap(self):
|
||||
if c.LITTLEGAME_BUTTON in self.game_info and self.game_info[c.LITTLEGAME_BUTTON]:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user