更改大喷菇攻击动画
This commit is contained in:
parent
dbcff71bc7
commit
2d1ca899e3
@ -165,7 +165,7 @@ class Fume(pg.sprite.Sprite):
|
|||||||
|
|
||||||
def update(self, game_info):
|
def update(self, game_info):
|
||||||
self.current_time = game_info[c.CURRENT_TIME]
|
self.current_time = game_info[c.CURRENT_TIME]
|
||||||
if self.current_time - self.timer >= 140:
|
if self.current_time - self.timer >= 100:
|
||||||
self.frame_index += 1
|
self.frame_index += 1
|
||||||
if self.frame_index >= self.frame_num:
|
if self.frame_index >= self.frame_num:
|
||||||
self.frame_index = self.frame_num - 1
|
self.frame_index = self.frame_num - 1
|
||||||
@ -1668,7 +1668,7 @@ class FumeShroom(Plant):
|
|||||||
def attacking(self):
|
def attacking(self):
|
||||||
if self.shoot_timer == 0:
|
if self.shoot_timer == 0:
|
||||||
self.shoot_timer = self.current_time - 700
|
self.shoot_timer = self.current_time - 700
|
||||||
elif self.current_time - self.shoot_timer >= 1200:
|
elif self.current_time - self.shoot_timer >= 1100:
|
||||||
if self.showAttackFrames:
|
if self.showAttackFrames:
|
||||||
self.showAttackFrames = False
|
self.showAttackFrames = False
|
||||||
self.changeFrames(self.attack_frames)
|
self.changeFrames(self.attack_frames)
|
||||||
|
|||||||
@ -1122,7 +1122,7 @@ class Level(tool.State):
|
|||||||
def checkCarCollisions(self):
|
def checkCarCollisions(self):
|
||||||
for car in self.cars:
|
for car in self.cars:
|
||||||
for zombie in self.zombie_groups[car.map_y]:
|
for zombie in self.zombie_groups[car.map_y]:
|
||||||
if zombie and zombie.state != c.DIE and (not zombie.lostHead) and zombie.rect.centerx <= 0:
|
if zombie and zombie.state != c.DIE and (not zombie.lostHead) and (zombie.rect.centerx <= 0):
|
||||||
car.setWalk()
|
car.setWalk()
|
||||||
if zombie.rect.centerx <= car.rect.x:
|
if zombie.rect.centerx <= car.rect.x:
|
||||||
zombie.health = 0
|
zombie.health = 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user