修复回到主菜单后的跳转bug
This commit is contained in:
parent
ebed295aed
commit
43f06cef96
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"background_type": 0,
|
"background_type": 0,
|
||||||
"init_sun_value":5000,
|
"init_sun_value": 50,
|
||||||
"shovel": 1,
|
"shovel": 1,
|
||||||
"zombie_list": [
|
"zombie_list": [
|
||||||
{ "time": 20000, "map_y": 0, "name": "Zombie" },
|
{ "time": 20000, "map_y": 0, "name": "Zombie" },
|
||||||
|
|||||||
@ -223,7 +223,7 @@ class Level(tool.State):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# 检查小菜单的重新开始有没有被点击
|
# 检查小菜单的主菜单有没有被点击
|
||||||
def checkMainMenuClick(self, mouse_pos):
|
def checkMainMenuClick(self, mouse_pos):
|
||||||
x, y = mouse_pos
|
x, y = mouse_pos
|
||||||
if(x >= self.mainMenu_button_rect.x and x <= self.mainMenu_button_rect.right and
|
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):
|
elif self.checkMainMenuClick(mouse_pos):
|
||||||
self.done = True
|
self.done = True
|
||||||
self.next = c.MAIN_MENU
|
self.next = c.MAIN_MENU
|
||||||
|
self.persist = {c.CURRENT_TIME:0.0, c.LEVEL_NUM:c.START_LEVEL_NUM}
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.zombie_start_time == 0:
|
if self.zombie_start_time == 0:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user