战斗节奏调整
This commit is contained in:
parent
a43068daf4
commit
32b9deba6d
@ -298,9 +298,7 @@ function BattleController:enterNextWave()
|
|||||||
self.battleUI:refreshWave(self.waveIndex)
|
self.battleUI:refreshWave(self.waveIndex)
|
||||||
end
|
end
|
||||||
if self.waveIndex == 1 then -- 第一波
|
if self.waveIndex == 1 then -- 第一波
|
||||||
self.isBossWave = self.defTeam:getMainUnit().unitEntity:getIsBoss()
|
self:generateBoard(true)
|
||||||
self:generateBoard()
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
self.defTeam:prepare()
|
self.defTeam:prepare()
|
||||||
@ -880,7 +878,7 @@ function BattleController:exeInstructions(callback)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleController:generateBoard()
|
function BattleController:generateBoard(isFirst)
|
||||||
local boardList, _ = self:getInitBoard()
|
local boardList, _ = self:getInitBoard()
|
||||||
if self.curBoardIndex and self.curBoardIndex >= #boardList then
|
if self.curBoardIndex and self.curBoardIndex >= #boardList then
|
||||||
return
|
return
|
||||||
@ -896,8 +894,8 @@ function BattleController:generateBoard()
|
|||||||
self.battleData:refreshBoard(board)
|
self.battleData:refreshBoard(board)
|
||||||
self.battleUI:initGridCell()
|
self.battleUI:initGridCell()
|
||||||
end, function()
|
end, function()
|
||||||
self:enterRoundBegin()
|
-- self:enterRoundBegin()
|
||||||
end)
|
end, isFirst)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleController:putBoardCacheSkill(callback)
|
function BattleController:putBoardCacheSkill(callback)
|
||||||
|
|||||||
@ -26,6 +26,7 @@ end
|
|||||||
function BattleSkillSelectUI:_display()
|
function BattleSkillSelectUI:_display()
|
||||||
local uiMap = self.root:genAllChildren()
|
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.skill_node.ad_btn.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_3))
|
||||||
|
uiMap["battle_skill_select_ui.bg_1"]:setVisible(true)
|
||||||
self:refreshRogueSkill()
|
self:refreshRogueSkill()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -43,11 +44,14 @@ function BattleSkillSelectUI:_addListeners()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
self.canvasGroup = uiMap["battle_skill_select_ui.skill_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
|
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)
|
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
|
if eventType == GConst.TOUCH_EVENT.DOWN or eventType == GConst.TOUCH_EVENT.DRAG then
|
||||||
self.canvasGroup.alpha = 0.3
|
self.canvasGroup.alpha = 0.3
|
||||||
|
self.bg:setVisible(false)
|
||||||
else
|
else
|
||||||
self.canvasGroup.alpha = 1
|
self.canvasGroup.alpha = 1
|
||||||
|
self.bg:setVisible(true)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -309,12 +309,23 @@ function BattleUI:onInitGridCellOver()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleUI:switchBoard(downCallback, callback)
|
function BattleUI:switchBoard(downCallback, callback, isFirst)
|
||||||
if self.switchBoardSeq then
|
if self.switchBoardSeq then
|
||||||
self.switchBoardSeq:Kill()
|
self.switchBoardSeq:Kill()
|
||||||
self.switchBoardSeq = nil
|
self.switchBoardSeq = nil
|
||||||
end
|
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 = self.root:createBindTweenSequence()
|
||||||
self.switchBoardSeq:Append(self.boardNode:getTransform():DOAnchorPos(BOARD_POS_DOWN, 0.5))
|
self.switchBoardSeq:Append(self.boardNode:getTransform():DOAnchorPos(BOARD_POS_DOWN, 0.5))
|
||||||
self.switchBoardSeq:AppendCallback(function()
|
self.switchBoardSeq:AppendCallback(function()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user