节奏调整
This commit is contained in:
parent
4aa36c0122
commit
f672783ab5
@ -231,25 +231,22 @@ function BattleUIPVP:enterShowBoardAni(callback)
|
|||||||
self.boardNode:setVisible(true)
|
self.boardNode:setVisible(true)
|
||||||
self.boardNode:setAnchoredPositionX(0)
|
self.boardNode:setAnchoredPositionX(0)
|
||||||
self.enterShowBoardSeq = self.root:createBindTweenSequence()
|
self.enterShowBoardSeq = self.root:createBindTweenSequence()
|
||||||
if not self.root.tag then
|
self.enterShowBoardSeq:AppendCallback(function()
|
||||||
self.root.tag = true
|
for posId, entity in pairs(self.battleController.battleData:getGridEnties()) do
|
||||||
self.enterShowBoardSeq:AppendCallback(function()
|
if entity:getCell() then
|
||||||
for posId, entity in pairs(self.battleController.battleData:getGridEnties()) do
|
local inCurRange = self.battleController:getPosIdInCurActionBoardRowRange(posId)
|
||||||
if entity:getCell() then
|
local parent
|
||||||
local inCurRange = self.battleController:getPosIdInCurActionBoardRowRange(posId)
|
if isAtkAction then
|
||||||
local parent
|
parent = inCurRange and self.atkBoard or self.defBoard
|
||||||
if isAtkAction then
|
else
|
||||||
parent = inCurRange and self.atkBoard or self.defBoard
|
parent = inCurRange and self.defBoard or self.atkBoard
|
||||||
else
|
end
|
||||||
parent = inCurRange and self.defBoard or self.atkBoard
|
if parent then
|
||||||
end
|
entity:getCell():getBaseObject():setParent(parent, true)
|
||||||
if parent then
|
|
||||||
entity:getCell():getBaseObject():setParent(parent, true)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end
|
||||||
end
|
end)
|
||||||
|
|
||||||
self.enterShowBoardSeq:Join(self.defBoardImg:getTransform():DOAnchorPosX(0, 0.5))
|
self.enterShowBoardSeq:Join(self.defBoardImg:getTransform():DOAnchorPosX(0, 0.5))
|
||||||
self.enterShowBoardSeq:Join(self.atkBoardImg:getTransform():DOAnchorPosX(0, 0.5))
|
self.enterShowBoardSeq:Join(self.atkBoardImg:getTransform():DOAnchorPosX(0, 0.5))
|
||||||
@ -275,26 +272,26 @@ end
|
|||||||
|
|
||||||
function BattleUIPVP:enterHideBoardAni(callback)
|
function BattleUIPVP:enterHideBoardAni(callback)
|
||||||
self:dealBoardMaskOnShowAni()
|
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:clearEnterShowBoardSeq()
|
||||||
self.enterShowBoardSeq = self.root:createBindTweenSequence()
|
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()
|
local w, h = GFunc.getUIExpandScreenSize()
|
||||||
self.enterShowBoardSeq:Join(self.defBoardImg:getTransform():DOAnchorPosX(w + 360, 0.5))
|
self.enterShowBoardSeq:Join(self.defBoardImg:getTransform():DOAnchorPosX(w + 360, 0.5))
|
||||||
self.enterShowBoardSeq:Join(self.atkBoardImg: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