From 9f6fbf2903c49c5dcd7e31c8dc0677b1b5ea8cfc Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Mon, 5 Jun 2023 16:20:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/game.lua | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/lua/app/game.lua b/lua/app/game.lua index c83a320a..4a659c01 100644 --- a/lua/app/game.lua +++ b/lua/app/game.lua @@ -400,41 +400,18 @@ if NOT_PUBLISH then end end - if Input.GetKeyDown(KeyCode.RightArrow) and Input.GetKey(KeyCode.LeftControl) then + if (Input.GetKeyDown(KeyCode.RightArrow) or Input.GetKeyDown(KeyCode.LeftArrow)) and Input.GetKey(KeyCode.LeftControl) then local configName = ModuleManager.DevToolManager.set_board_info.config local idx = ModuleManager.DevToolManager.set_board_info.idx or 0 if not configName then return end local config = ConfigManager:getConfig(configName) - idx = idx + 1 - if not config[idx] then - Logger.logHighlight(configName .. " 没有id idx = " .. idx) - return + if Input.GetKeyDown(KeyCode.LeftArrow) then + idx = idx - 1 + else + idx = idx + 1 end - Logger.logHighlight(configName .. " 当前 idx = " .. idx) - ModuleManager.DevToolManager.set_board_info.idx = idx - - local board = config[idx].board - if not board then - board = config[idx].board_daily_challenge - end - - if ModuleManager.BattleManager:isInBattle() then - local battleController = ModuleManager.BattleManager.battleController - battleController.battleData:refreshBoard(board, battleController:getBlockIcon()) - battleController.battleUI:initGridCell() - end - end - - if Input.GetKeyDown(KeyCode.LeftArrow) and Input.GetKey(KeyCode.LeftControl) then - local configName = ModuleManager.DevToolManager.set_board_info.config - local idx = ModuleManager.DevToolManager.set_board_info.idx or 0 - if not configName then - return - end - local config = ConfigManager:getConfig(configName) - idx = idx - 1 if not config[idx] then Logger.logHighlight(configName .. " 没有id idx = " .. idx) return