From b1e5a6fc26f9487217dce1d1a766d57f8d804790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Thu, 14 Apr 2022 08:58:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B0=8F=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=90=8E=E4=B8=8D=E8=83=BD=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E5=86=92=E9=99=A9=E6=A8=A1=E5=BC=8F=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/state/level.py | 2 +- source/state/mainmenu.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/state/level.py b/source/state/level.py index f2219f4..2e6d0fc 100644 --- a/source/state/level.py +++ b/source/state/level.py @@ -31,7 +31,7 @@ class Level(tool.State): def loadMap(self): modeList = ['adventure', 'littleGame'] - if c.LITTLEGAME_BUTTON in self.game_info: + if c.LITTLEGAME_BUTTON in self.game_info and self.game_info[c.LITTLEGAME_BUTTON]: map_file = 'littleGame_' + str(self.game_info[c.LITTLEGAME_NUM]) + '.json' mode = 'littleGame' else: diff --git a/source/state/mainmenu.py b/source/state/mainmenu.py index 43fb3c6..7ba5825 100644 --- a/source/state/mainmenu.py +++ b/source/state/mainmenu.py @@ -63,6 +63,7 @@ class Menu(tool.State): y >= self.option_rect.y and y <= self.option_rect.bottom): self.option_clicked = True self.option_timer = self.option_start = self.current_time + self.persist[c.LITTLEGAME_BUTTON] = False return False # 点击到按钮,修改转态的done属性 @@ -81,6 +82,7 @@ class Menu(tool.State): y >= self.option_littleGame_rect.y and y <= self.option_littleGame_rect.bottom): self.done = True # 确实小游戏还是用的level + # 因为目前暂时没有生存模式和解谜模式,所以暂时设置为这样 self.persist[c.LITTLEGAME_BUTTON] = True def update(self, surface, current_time, mouse_pos, mouse_click):