修复所有关卡完成后直接闪退的bug

This commit is contained in:
星外之神 2022-04-05 10:37:57 +08:00
parent c1e511ffe8
commit 6bcae32dc9
3 changed files with 1 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 118 KiB

View File

@ -936,7 +936,7 @@ class RedWallNutBowling(Plant):
self.orig_y = y
self.explode_timer = 0
self.explode_y_range = 1
self.explode_x_range = c.GRID_X_SIZE
self.explode_x_range = c.GRID_X_SIZE * 1.5
self.init_rect = self.rect.copy()
self.rotate_degree = 0
self.animate_interval = 200

View File

@ -41,8 +41,6 @@ class Level(tool.State):
f.close()
except Exception as e:
print("游戏结束")
f = open(file_path)
self.map_data = json.load(f)
self.done = True
self.next = c.MAIN_MENU
pg.mixer.music.stop()