战斗节奏调整

This commit is contained in:
xiekaidong 2023-04-19 18:38:09 +08:00
parent a43068daf4
commit 32b9deba6d
3 changed files with 20 additions and 7 deletions

View File

@ -298,9 +298,7 @@ function BattleController:enterNextWave()
self.battleUI:refreshWave(self.waveIndex)
end
if self.waveIndex == 1 then -- 第一波
self.isBossWave = self.defTeam:getMainUnit().unitEntity:getIsBoss()
self:generateBoard()
return
self:generateBoard(true)
end
self.defTeam:prepare()
@ -880,7 +878,7 @@ function BattleController:exeInstructions(callback)
end
end
function BattleController:generateBoard()
function BattleController:generateBoard(isFirst)
local boardList, _ = self:getInitBoard()
if self.curBoardIndex and self.curBoardIndex >= #boardList then
return
@ -896,8 +894,8 @@ function BattleController:generateBoard()
self.battleData:refreshBoard(board)
self.battleUI:initGridCell()
end, function()
self:enterRoundBegin()
end)
-- self:enterRoundBegin()
end, isFirst)
end
function BattleController:putBoardCacheSkill(callback)

View File

@ -26,6 +26,7 @@ end
function BattleSkillSelectUI:_display()
local uiMap = self.root:genAllChildren()
uiMap["battle_skill_select_ui.skill_node.ad_btn.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_3))
uiMap["battle_skill_select_ui.bg_1"]:setVisible(true)
self:refreshRogueSkill()
end
@ -43,11 +44,14 @@ function BattleSkillSelectUI:_addListeners()
end)
self.canvasGroup = uiMap["battle_skill_select_ui.skill_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
self.bg = uiMap["battle_skill_select_ui.bg_1"]
uiMap["battle_skill_select_ui.look_btn"]:addTouchListener(function(eventType, x, y)
if eventType == GConst.TOUCH_EVENT.DOWN or eventType == GConst.TOUCH_EVENT.DRAG then
self.canvasGroup.alpha = 0.3
self.bg:setVisible(false)
else
self.canvasGroup.alpha = 1
self.bg:setVisible(true)
end
end)
end

View File

@ -309,12 +309,23 @@ function BattleUI:onInitGridCellOver()
end
end
function BattleUI:switchBoard(downCallback, callback)
function BattleUI:switchBoard(downCallback, callback, isFirst)
if self.switchBoardSeq then
self.switchBoardSeq:Kill()
self.switchBoardSeq = nil
end
if isFirst then
if downCallback then
downCallback()
end
if callback then
callback()
end
self.boardNode:setAnchoredPositionY(BOARD_POS_UP.y)
return
end
self.switchBoardSeq = self.root:createBindTweenSequence()
self.switchBoardSeq:Append(self.boardNode:getTransform():DOAnchorPos(BOARD_POS_DOWN, 0.5))
self.switchBoardSeq:AppendCallback(function()