显示优化

This commit is contained in:
xiekaidong 2023-06-01 22:10:01 +08:00
parent 6b3734e703
commit 09e4b06ccd
3 changed files with 23 additions and 0 deletions

View File

@ -24,14 +24,31 @@ function BattleBoxOpenUI:onLoadRootComplete()
self.rewardCell:refreshByConfig(reward)
end
self.aniOver = false
uiMap["battle_box_open_ui.mask"]:addClickListener(function()
if not self.aniOver then
return
end
self:closeUI()
if self.callback then
self.callback()
end
end)
if self.seqAni then
self.seqAni:Kill()
self.seqAni = nil
end
local canvasGroup = uiMap["battle_box_open_ui.title_bg"]:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
canvasGroup.alpha = 0
uiMap["battle_box_open_ui.title_bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_11))
uiMap["battle_box_open_ui.ui_spine_obj"]:playAnim("born", false, true)
self.seqAni = self.root:createBindTweenSequence()
self.seqAni:Insert(0.75, canvasGroup:DOFade(1, 0.5))
self.seqAni:AppendCallback(function()
self.aniOver = true
end)
end
return BattleBoxOpenUI

View File

@ -32,6 +32,8 @@ function GridCell:refresh(gridEntity, curElement, skillPosId)
local spineObj = uiMap["grid_cell.touch_node.ani_node.up_bg.ui_spine_obj"]
local upBg = uiMap["grid_cell.touch_node.ani_node.up_bg"]
if gridEntity:getSpineAsset() then
local scale = gridEntity:getSpineScale()
spineObj:setLocalScale(scale, scale, scale)
spineObj:setActive(true)
spineObj:loadAssetAsync(gridEntity:getSpineAsset(), function()
if gridEntity:getSpineChangeName() then

View File

@ -406,4 +406,8 @@ function BattleGridEntity:getSpineChangeName()
return self:getGridTypeConfig().spine_change
end
function BattleGridEntity:getSpineScale()
return self:getGridTypeConfig().zoom or 1
end
return BattleGridEntity