解锁动画
This commit is contained in:
parent
44085f6c23
commit
9feb05f0e6
@ -30,7 +30,7 @@ end
|
||||
function ModuleUnlockUI:onLoadRootComplete()
|
||||
self.uiMap = self.root:genAllChildren()
|
||||
self.uiMap["module_unlock_ui.bg"]:addClickListener(function()
|
||||
self:showModuleUnlockAnimation()
|
||||
self:showNextModuleUnlockAnimation()
|
||||
end)
|
||||
|
||||
self.moduleNameTx = self.uiMap["module_unlock_ui.name_tx"]
|
||||
@ -41,23 +41,29 @@ function ModuleUnlockUI:onLoadRootComplete()
|
||||
self:showModuleUnlockAnimation()
|
||||
end
|
||||
|
||||
function ModuleUnlockUI:showNextModuleUnlockAnimation()
|
||||
if self:showModuleUnlockAnimation() then
|
||||
self:playUnlockAnimation()
|
||||
end
|
||||
end
|
||||
|
||||
function ModuleUnlockUI:showModuleUnlockAnimation()
|
||||
if #self.unlockList <= 0 then
|
||||
self:closeUI()
|
||||
return
|
||||
return false
|
||||
end
|
||||
local moduleKey = table.remove(self.unlockList, 1)
|
||||
local info = ConfigManager:getConfig("func_open")[moduleKey]
|
||||
local i18nInfo = I18N:getConfig("func_open")[moduleKey]
|
||||
if info == nil or i18nInfo == nil then
|
||||
self:closeUI()
|
||||
return
|
||||
return false
|
||||
end
|
||||
self.moduleNameTx:setText(i18nInfo.name)
|
||||
self:playAnimation()
|
||||
return true
|
||||
end
|
||||
|
||||
function ModuleUnlockUI:playAnimation()
|
||||
function ModuleUnlockUI:playUnlockAnimation()
|
||||
if self.unlockAnimationSeq == nil then
|
||||
local scaleTween1 = self.root:getTransform():DOScale(1.05, 0.15)
|
||||
self.unlockAnimationSeq:Append(scaleTween1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user