更改冰道设定
This commit is contained in:
parent
8a934ebbb1
commit
5bb62383c5
@ -1716,3 +1716,10 @@ class FumeShroom(Plant):
|
||||
class IceFrozenPlot(Plant):
|
||||
def __init__(self, x, y):
|
||||
Plant.__init__(self, x, y, c.ICE_FROZEN_PLOT, c.INF, None)
|
||||
self.timer = 0
|
||||
|
||||
def idling(self):
|
||||
if self.timer == 0:
|
||||
self.timer = self.current_time
|
||||
elif self.current_time - self.timer >= 30000:
|
||||
self.health = 0
|
||||
@ -1208,6 +1208,10 @@ class Level(tool.State):
|
||||
elif targetPlant.name == c.JALAPENO:
|
||||
self.boomZombies(targetPlant.rect.centerx, map_y, targetPlant.explode_y_range,
|
||||
targetPlant.explode_x_range, effect=c.BULLET_EFFECT_UNICE)
|
||||
# 消除冰道
|
||||
for i in self.plant_groups[map_y]:
|
||||
if i.name == c.ICE_FROZEN_PLOT:
|
||||
i.health = 0
|
||||
elif targetPlant.name == c.ICESHROOM and targetPlant.state != c.SLEEP:
|
||||
self.freezeZombies(targetPlant)
|
||||
elif targetPlant.name == c.HYPNOSHROOM and targetPlant.state != c.SLEEP:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user