修复回到主菜单后的跳转bug

This commit is contained in:
wcb_dell 2020-12-01 11:07:34 +08:00
parent ebed295aed
commit 43f06cef96
2 changed files with 19 additions and 18 deletions

View File

@ -1,6 +1,6 @@
{
"background_type": 0,
"init_sun_value":5000,
"init_sun_value": 50,
"shovel": 1,
"zombie_list": [
{ "time": 20000, "map_y": 0, "name": "Zombie" },

View File

@ -223,7 +223,7 @@ class Level(tool.State):
return True
return False
# 检查小菜单的重新开始有没有被点击
# 检查小菜单的主菜单有没有被点击
def checkMainMenuClick(self, mouse_pos):
x, y = mouse_pos
if(x >= self.mainMenu_button_rect.x and x <= self.mainMenu_button_rect.right and
@ -263,6 +263,7 @@ class Level(tool.State):
elif self.checkMainMenuClick(mouse_pos):
self.done = True
self.next = c.MAIN_MENU
self.persist = {c.CURRENT_TIME:0.0, c.LEVEL_NUM:c.START_LEVEL_NUM}
return
if self.zombie_start_time == 0: