优化一下
This commit is contained in:
parent
45ddce3dc3
commit
9f6fbf2903
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user