战斗调整
This commit is contained in:
parent
cae3580d2c
commit
36526bcd5e
@ -1122,7 +1122,11 @@ function BattleBaseUI:onInitGridCellOver()
|
|||||||
end)
|
end)
|
||||||
cell:unBindAll()
|
cell:unBindAll()
|
||||||
cell:bind(entity, "isDirty", function()
|
cell:bind(entity, "isDirty", function()
|
||||||
cell:refresh(entity, self.curElementType)
|
local elementType = self.curElementType
|
||||||
|
if not self.battleController:getPosIdInCurActionBoardRowRange(entity:getPosId()) then
|
||||||
|
elementType = nil
|
||||||
|
end
|
||||||
|
cell:refresh(entity, elementType)
|
||||||
end)
|
end)
|
||||||
local pos = entity:getPos()
|
local pos = entity:getPos()
|
||||||
cell:getBaseObject():setAnchoredPosition(pos.x, pos.y)
|
cell:getBaseObject():setAnchoredPosition(pos.x, pos.y)
|
||||||
@ -1173,8 +1177,14 @@ end
|
|||||||
function BattleBaseUI:refreshBoard()
|
function BattleBaseUI:refreshBoard()
|
||||||
local entities = self.battleData:getGridEnties()
|
local entities = self.battleData:getGridEnties()
|
||||||
for posId, entity in pairs(entities) do
|
for posId, entity in pairs(entities) do
|
||||||
|
local elementType = self.curElementType
|
||||||
|
local skillPosId = self.skillPosId
|
||||||
|
if not self.battleController:getPosIdInCurActionBoardRowRange(posId) then
|
||||||
|
elementType = nil
|
||||||
|
skillPosId = nil
|
||||||
|
end
|
||||||
if entity and entity:getCell() then
|
if entity and entity:getCell() then
|
||||||
entity:getCell():refresh(entity, self.curElementType, self.skillPosId)
|
entity:getCell():refresh(entity, elementType, skillPosId)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user