加入睡莲

This commit is contained in:
星外之神 2022-04-20 14:37:23 +08:00
parent 008fe52c9e
commit 9f3d2eae91
16 changed files with 8 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -1015,4 +1015,8 @@ class RedWallNutBowling(Plant):
self.rect = self.image.get_rect(center=self.init_rect.center)
def getPosition(self):
return (self.rect.centerx, self.orig_y)
return (self.rect.centerx, self.orig_y)
class LilyPad(Plant):
def __init__(self, x, y):
Plant.__init__(self, x, y, c.LILYPAD, c.PLANT_HEALTH, None)

View File

@ -148,6 +148,7 @@ ICESHROOM = 'IceShroom'
HYPNOSHROOM = 'HypnoShroom'
WALLNUTBOWLING = 'WallNutBowling'
REDWALLNUTBOWLING = 'RedWallNutBowling'
LILYPAD = 'LilyPad'
PLANT_HEALTH = 300
WALLNUT_HEALTH = 4000

View File

@ -515,6 +515,8 @@ class Level(tool.State):
new_plant = plant.WallNutBowling(x, y, map_y, self)
elif self.plant_name == c.REDWALLNUTBOWLING:
new_plant = plant.RedWallNutBowling(x, y)
elif self.plant_name == c.LILYPAD:
new_plant = plant.LilyPad(x, y)
if new_plant.can_sleep and self.background_type in {c.BACKGROUND_DAY, c.BACKGROUND_POOL, c.BACKGROUND_ROOF, c.BACKGROUND_WALLNUTBOWLING, c.BACKGROUND_SINGLE, c.BACKGROUND_TRIPLE}:
new_plant.setSleep()