显示问题修复
This commit is contained in:
parent
9ae7f3d8a0
commit
21365f487e
@ -1436,7 +1436,7 @@ function BattleBaseController:onFillBoardOver(isRoundBeginCheck)
|
|||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
self:generateSkill(function()
|
self:generateSkill(function()
|
||||||
self.battleUI:refreshSkill()
|
self.battleUI:refreshSkill(nil, nil, self:getCurActionSide())
|
||||||
if self.onFillBoardOverCallback then
|
if self.onFillBoardOverCallback then
|
||||||
local callback = self.onFillBoardOverCallback
|
local callback = self.onFillBoardOverCallback
|
||||||
self.onFillBoardOverCallback = nil
|
self.onFillBoardOverCallback = nil
|
||||||
@ -2059,7 +2059,7 @@ function BattleBaseController:onSelectSkill(skillId, value, pos, side)
|
|||||||
self.battleUI:gotOneSkillAni(skillId, elementType, function()
|
self.battleUI:gotOneSkillAni(skillId, elementType, function()
|
||||||
self:selectSKillNextToStep()
|
self:selectSKillNextToStep()
|
||||||
self.battleUI:refreshBoard()
|
self.battleUI:refreshBoard()
|
||||||
self.battleUI:refreshSkill()
|
self.battleUI:refreshSkill(nil, nil, self:getCurActionSide())
|
||||||
end, pos)
|
end, pos)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
@ -435,9 +435,10 @@ local function _takeAddSkillEnergy(atkUnitComp, skillEntity, battleController)
|
|||||||
elementType = boardSkills[math.random(1, count)]
|
elementType = boardSkills[math.random(1, count)]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local side = battleController:getCurActionSide()
|
||||||
elementTypeMap = {[elementType] = addEnergy}
|
elementTypeMap = {[elementType] = addEnergy}
|
||||||
battleController:addSkillEnergy(elementTypeMap)
|
battleController:addSkillEnergy(elementTypeMap, side)
|
||||||
battleController.battleUI:refreshSkill()
|
battleController.battleUI:refreshSkill(nil, nil, side)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function _takeChangeElementType(atkUnitComp, skillEntity, battleController)
|
local function _takeChangeElementType(atkUnitComp, skillEntity, battleController)
|
||||||
|
|||||||
@ -1519,7 +1519,7 @@ function BattleBaseUI:generateSkillAni(map, callback, side)
|
|||||||
local entity = self.generateSkillGridEntities[elementType]
|
local entity = self.generateSkillGridEntities[elementType]
|
||||||
if entity and entity:getCell() then
|
if entity and entity:getCell() then
|
||||||
count = count + 1
|
count = count + 1
|
||||||
entity:setSkilId(info.skillId)
|
entity:setSkilId(info.skillId, false, side)
|
||||||
local cell = entity:getCell()
|
local cell = entity:getCell()
|
||||||
cell:refresh(entity)
|
cell:refresh(entity)
|
||||||
self.generateSkillAniSeq:AppendCallback(function()
|
self.generateSkillAniSeq:AppendCallback(function()
|
||||||
@ -1853,7 +1853,7 @@ function BattleBaseUI:doCacheAni(skillInfo, callback)
|
|||||||
for index, info in ipairs(skillInfo) do
|
for index, info in ipairs(skillInfo) do
|
||||||
local entity = self.root.skillAniGridEntities[index]
|
local entity = self.root.skillAniGridEntities[index]
|
||||||
if entity then
|
if entity then
|
||||||
entity:setSkilId(info.skillId)
|
entity:setSkilId(info.skillId, false, self.battleController:getCurActionSide())
|
||||||
local pos = self:getPosInfo(info.posId)
|
local pos = self:getPosInfo(info.posId)
|
||||||
local cell = entity:getCell()
|
local cell = entity:getCell()
|
||||||
if cell then
|
if cell then
|
||||||
@ -1928,7 +1928,7 @@ function BattleBaseUI:doCachePopAni(skillInfo, callback)
|
|||||||
for index, info in ipairs(skillInfo) do
|
for index, info in ipairs(skillInfo) do
|
||||||
local entity = self.root.skillAniGridEntities[index]
|
local entity = self.root.skillAniGridEntities[index]
|
||||||
if entity then
|
if entity then
|
||||||
entity:setSkilId(info.skillId)
|
entity:setSkilId(info.skillId, false, self.battleController:getCurActionSide())
|
||||||
local cell = entity:getCell()
|
local cell = entity:getCell()
|
||||||
if cell then
|
if cell then
|
||||||
cell:refresh(entity)
|
cell:refresh(entity)
|
||||||
|
|||||||
@ -91,17 +91,19 @@ function GridCell:refresh(gridEntity, curElement, skillPosId)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local ignoreElementType = skillEntity:getIgnoreElementType()
|
if skillEntity then
|
||||||
local skillBg
|
local ignoreElementType = skillEntity:getIgnoreElementType()
|
||||||
if ignoreElementType and not self.lastShowHlElementType then
|
local skillBg
|
||||||
skillBg = GConst.BattleConst.SKILL_ELEMENT_BG_2.skill
|
if ignoreElementType and not self.lastShowHlElementType then
|
||||||
else
|
skillBg = GConst.BattleConst.SKILL_ELEMENT_BG_2.skill
|
||||||
local mainElementType = self.lastShowHlElementType or skillEntity:getPosition()
|
else
|
||||||
skillBg = GConst.BattleConst.SKILL_ELEMENT_BG_2[mainElementType]
|
local mainElementType = self.lastShowHlElementType or skillEntity:getPosition()
|
||||||
end
|
skillBg = GConst.BattleConst.SKILL_ELEMENT_BG_2[mainElementType]
|
||||||
if self.lastSkillBg ~= skillBg then
|
end
|
||||||
self.lastSkillBg = skillBg
|
if self.lastSkillBg ~= skillBg then
|
||||||
downBg:setSprite(GConst.ATLAS_PATH.BATTLE, self.lastSkillBg)
|
self.lastSkillBg = skillBg
|
||||||
|
downBg:setSprite(GConst.ATLAS_PATH.BATTLE, self.lastSkillBg)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
skillIcon:setVisible(false)
|
skillIcon:setVisible(false)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user