向左遍历棋盘

This commit is contained in:
xiekaidong 2023-06-05 16:17:46 +08:00
parent f081edb320
commit 45ddce3dc3

View File

@ -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