修复从游戏中返回主菜单时闪退的bug
This commit is contained in:
parent
17b91b2ae2
commit
d227a28452
@ -544,7 +544,8 @@ 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, c.LEVEL_NUM:self.persist[c.LEVEL_NUM], c.LITTLEGAME_NUM:self.persist[c.LITTLEGAME_NUM]}
|
self.persist = self.game_info
|
||||||
|
self.persist[c.CURRENT_TIME] = 0
|
||||||
# 播放点击音效
|
# 播放点击音效
|
||||||
pg.mixer.Sound(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))) ,"resources", "sound", "buttonclick.ogg")).play()
|
pg.mixer.Sound(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))) ,"resources", "sound", "buttonclick.ogg")).play()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user