优化一下
This commit is contained in:
parent
45ddce3dc3
commit
9f6fbf2903
@ -400,41 +400,18 @@ if NOT_PUBLISH then
|
|||||||
end
|
end
|
||||||
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 configName = ModuleManager.DevToolManager.set_board_info.config
|
||||||
local idx = ModuleManager.DevToolManager.set_board_info.idx or 0
|
local idx = ModuleManager.DevToolManager.set_board_info.idx or 0
|
||||||
if not configName then
|
if not configName then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local config = ConfigManager:getConfig(configName)
|
local config = ConfigManager:getConfig(configName)
|
||||||
idx = idx + 1
|
if Input.GetKeyDown(KeyCode.LeftArrow) then
|
||||||
if not config[idx] then
|
idx = idx - 1
|
||||||
Logger.logHighlight(configName .. " 没有id idx = " .. idx)
|
else
|
||||||
return
|
idx = idx + 1
|
||||||
end
|
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
|
if not config[idx] then
|
||||||
Logger.logHighlight(configName .. " 没有id idx = " .. idx)
|
Logger.logHighlight(configName .. " 没有id idx = " .. idx)
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user