预设添加动画代码提交

jiaoyangna 2020-09-07 10:01:08 +08:00
parent 7da522065d
commit 5e3e27c056
4 changed files with 39 additions and 6 deletions

View File

@ -295,6 +295,24 @@ function PlayUIAnim(gameObject, callback)
end
end
function SecTorPlayAnim(prefabList)
for i, node in ipairs(prefabList) do
Timer.New(function ()
node.gameObject:SetActive(true)
PlayUIAnim(node.gameObject)
end, 0.05*(i-1)):Start()
end
end
function SecTorPlayAnimByScroll(scroll)
scroll:ForeachItemGO(function (index, go)
Timer.New(function ()
go.gameObject:SetActive(true)
PlayUIAnim(go.gameObject)
end, 0.05*(index-1)):Start()
end)
end
function PlayUIAnimBack(gameObject, callback)
--local anim = gameObject:GetComponent(typeof(PlayFlyAnim))
local anim = gameObject:GetComponent("PlayFlyAnim")

View File

@ -227,6 +227,7 @@ function CourtesyDressPanel:OnShowActivityData(activityData, activityType, getRe
end
--this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
end)
SecTorPlayAnimByScroll( this.ScrollView)
if (activityType == ActivityTypeDef.OnlineGift) then--写在这的原因是先实例化完毕之后再在线奖励再计时显示
self:RemainTimeDown()
end

View File

@ -150,6 +150,7 @@ end
--界面打开时调用(用于子类重写)
function ArenaView:OnOpen(...)
this.RefreshBaseData()
this.RefreshEnemyData()
@ -264,9 +265,11 @@ end
function this.RefreshEnemyData()
local leftTimes = ArenaManager.GetArenaChallengeTimes()
local EnemyList = ArenaManager.GetEnemyList()
SecTorPlayAnim(this.Enemys)
for i, node in ipairs(this.Enemys) do
node:SetActive(false)
if EnemyList[i] then
node:SetActive(true)
--node:SetActive(true)
local lv_name = Util.GetGameObject(node, "name")
local integral = Util.GetGameObject(node, "integral")
local power = Util.GetGameObject(node, "power")
@ -310,6 +313,7 @@ function this.RefreshEnemyData()
node:SetActive(false)
end
end
end
--显示上边积分奖励

View File

@ -11,6 +11,7 @@ local curData={}
local orginLayer=0
local carbonIndex=0--副本索引
local isPlay = true
local maxForce = 0
--顶部背景图
local titleBg={
@ -77,6 +78,7 @@ function DailyCarbonPanel:InitComponent()
this.tabBox = Util.GetGameObject(this.panel, "TabBox")
this.TabCtrl = TabBox.New()
isPlay = true
end
function DailyCarbonPanel:BindEvent()
@ -114,7 +116,7 @@ function DailyCarbonPanel:OnOpen(_carbonIndex)
end
function DailyCarbonPanel:OnShow()
isPlay = true
local curFormationForce = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
if PlayerManager.maxForce < curFormationForce then
PlayerManager.maxForce = curFormationForce
@ -155,6 +157,9 @@ end
--刷新面板
function this.RefreshShow(i)
if i ~= carbonIndex then
isPlay = true
end
carbonIndex = i
curData={}
@ -175,6 +180,11 @@ function this.SetScroll(i)
this.scrollView:SetData(curData,function(index,root)
this.SetData(root,curData[index], curData[index - 1])
end)
if isPlay then
isPlay = false
SecTorPlayAnimByScroll(this.scrollView)
end
for k,v in ipairs(curData) do
if not CarbonManager.IsDailyCarbonPass(v.Id) then
curMaxOpenId = k