增加容错

This commit is contained in:
xiekaidong 2023-08-29 14:54:54 +08:00
parent 72d90d6499
commit 859bbd42b9

View File

@ -1215,6 +1215,9 @@ function BattleBaseUI:onInitGridCellOver()
local pos = entity:getPos() local pos = entity:getPos()
cell:getBaseObject():setParent(self.gridNode, true) cell:getBaseObject():setParent(self.gridNode, true)
cell:getBaseObject():setAnchoredPosition(pos.x, pos.y) cell:getBaseObject():setAnchoredPosition(pos.x, pos.y)
if entity:getIsIdle() then
cell:getBaseObject():setAnchoredPositionX(DEFAULT_X)
end
entity:setCell(cell) entity:setCell(cell)
end end
end end