节奏调整
This commit is contained in:
parent
4aa36c0122
commit
f672783ab5
@ -231,25 +231,22 @@ function BattleUIPVP:enterShowBoardAni(callback)
|
||||
self.boardNode:setVisible(true)
|
||||
self.boardNode:setAnchoredPositionX(0)
|
||||
self.enterShowBoardSeq = self.root:createBindTweenSequence()
|
||||
if not self.root.tag then
|
||||
self.root.tag = true
|
||||
self.enterShowBoardSeq:AppendCallback(function()
|
||||
for posId, entity in pairs(self.battleController.battleData:getGridEnties()) do
|
||||
if entity:getCell() then
|
||||
local inCurRange = self.battleController:getPosIdInCurActionBoardRowRange(posId)
|
||||
local parent
|
||||
if isAtkAction then
|
||||
parent = inCurRange and self.atkBoard or self.defBoard
|
||||
else
|
||||
parent = inCurRange and self.defBoard or self.atkBoard
|
||||
end
|
||||
if parent then
|
||||
entity:getCell():getBaseObject():setParent(parent, true)
|
||||
end
|
||||
self.enterShowBoardSeq:AppendCallback(function()
|
||||
for posId, entity in pairs(self.battleController.battleData:getGridEnties()) do
|
||||
if entity:getCell() then
|
||||
local inCurRange = self.battleController:getPosIdInCurActionBoardRowRange(posId)
|
||||
local parent
|
||||
if isAtkAction then
|
||||
parent = inCurRange and self.atkBoard or self.defBoard
|
||||
else
|
||||
parent = inCurRange and self.defBoard or self.atkBoard
|
||||
end
|
||||
if parent then
|
||||
entity:getCell():getBaseObject():setParent(parent, true)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
self.enterShowBoardSeq:Join(self.defBoardImg:getTransform():DOAnchorPosX(0, 0.5))
|
||||
self.enterShowBoardSeq:Join(self.atkBoardImg:getTransform():DOAnchorPosX(0, 0.5))
|
||||
@ -275,26 +272,26 @@ end
|
||||
|
||||
function BattleUIPVP:enterHideBoardAni(callback)
|
||||
self:dealBoardMaskOnShowAni()
|
||||
|
||||
local isAtkAction = self.battleController.curActionSide == GConst.BattleConst.SIDE_ATK
|
||||
for posId, entity in pairs(self.battleController.battleData:getGridEnties()) do
|
||||
if entity:getCell() then
|
||||
local inCurRange = self.battleController:getPosIdInCurActionBoardRowRange(posId)
|
||||
local parent
|
||||
if isAtkAction then
|
||||
parent = inCurRange and self.atkBoard or self.defBoard
|
||||
else
|
||||
parent = inCurRange and self.defBoard or self.atkBoard
|
||||
end
|
||||
if parent then
|
||||
entity:getCell():getBaseObject():setParent(parent, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self:clearEnterShowBoardSeq()
|
||||
self.enterShowBoardSeq = self.root:createBindTweenSequence()
|
||||
self.enterShowBoardSeq:AppendInterval(1)
|
||||
self.enterShowBoardSeq:AppendInterval(0.5)
|
||||
self.enterShowBoardSeq:AppendCallback(function()
|
||||
local isAtkAction = self.battleController.curActionSide == GConst.BattleConst.SIDE_ATK
|
||||
for posId, entity in pairs(self.battleController.battleData:getGridEnties()) do
|
||||
if entity:getCell() then
|
||||
local inCurRange = self.battleController:getPosIdInCurActionBoardRowRange(posId)
|
||||
local parent
|
||||
if isAtkAction then
|
||||
parent = inCurRange and self.atkBoard or self.defBoard
|
||||
else
|
||||
parent = inCurRange and self.defBoard or self.atkBoard
|
||||
end
|
||||
if parent then
|
||||
entity:getCell():getBaseObject():setParent(parent, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
local w, h = GFunc.getUIExpandScreenSize()
|
||||
self.enterShowBoardSeq:Join(self.defBoardImg:getTransform():DOAnchorPosX(w + 360, 0.5))
|
||||
self.enterShowBoardSeq:Join(self.atkBoardImg:getTransform():DOAnchorPosX(-(w + 360), 0.5))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user