diff --git a/lua/app/game.lua b/lua/app/game.lua index a83b2604..c83a320a 100644 --- a/lua/app/game.lua +++ b/lua/app/game.lua @@ -426,6 +426,33 @@ if NOT_PUBLISH then 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 + 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 end Game._releaseOnApplicationFocus = Game.onApplicationFocus