预设添加动画代码提交
parent
7da522065d
commit
5e3e27c056
|
|
@ -295,6 +295,24 @@ function PlayUIAnim(gameObject, callback)
|
||||||
end
|
end
|
||||||
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)
|
function PlayUIAnimBack(gameObject, callback)
|
||||||
--local anim = gameObject:GetComponent(typeof(PlayFlyAnim))
|
--local anim = gameObject:GetComponent(typeof(PlayFlyAnim))
|
||||||
local anim = gameObject:GetComponent("PlayFlyAnim")
|
local anim = gameObject:GetComponent("PlayFlyAnim")
|
||||||
|
|
|
||||||
|
|
@ -227,6 +227,7 @@ function CourtesyDressPanel:OnShowActivityData(activityData, activityType, getRe
|
||||||
end
|
end
|
||||||
--this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
|
--this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
|
||||||
end)
|
end)
|
||||||
|
SecTorPlayAnimByScroll( this.ScrollView)
|
||||||
if (activityType == ActivityTypeDef.OnlineGift) then--写在这的原因是先实例化完毕之后再在线奖励再计时显示
|
if (activityType == ActivityTypeDef.OnlineGift) then--写在这的原因是先实例化完毕之后再在线奖励再计时显示
|
||||||
self:RemainTimeDown()
|
self:RemainTimeDown()
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,7 @@ end
|
||||||
|
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function ArenaView:OnOpen(...)
|
function ArenaView:OnOpen(...)
|
||||||
|
|
||||||
this.RefreshBaseData()
|
this.RefreshBaseData()
|
||||||
|
|
||||||
this.RefreshEnemyData()
|
this.RefreshEnemyData()
|
||||||
|
|
@ -264,9 +265,11 @@ end
|
||||||
function this.RefreshEnemyData()
|
function this.RefreshEnemyData()
|
||||||
local leftTimes = ArenaManager.GetArenaChallengeTimes()
|
local leftTimes = ArenaManager.GetArenaChallengeTimes()
|
||||||
local EnemyList = ArenaManager.GetEnemyList()
|
local EnemyList = ArenaManager.GetEnemyList()
|
||||||
|
SecTorPlayAnim(this.Enemys)
|
||||||
for i, node in ipairs(this.Enemys) do
|
for i, node in ipairs(this.Enemys) do
|
||||||
|
node:SetActive(false)
|
||||||
if EnemyList[i] then
|
if EnemyList[i] then
|
||||||
node:SetActive(true)
|
--node:SetActive(true)
|
||||||
local lv_name = Util.GetGameObject(node, "name")
|
local lv_name = Util.GetGameObject(node, "name")
|
||||||
local integral = Util.GetGameObject(node, "integral")
|
local integral = Util.GetGameObject(node, "integral")
|
||||||
local power = Util.GetGameObject(node, "power")
|
local power = Util.GetGameObject(node, "power")
|
||||||
|
|
@ -310,6 +313,7 @@ function this.RefreshEnemyData()
|
||||||
node:SetActive(false)
|
node:SetActive(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--显示上边积分奖励
|
--显示上边积分奖励
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ local curData={}
|
||||||
local orginLayer=0
|
local orginLayer=0
|
||||||
|
|
||||||
local carbonIndex=0--副本索引
|
local carbonIndex=0--副本索引
|
||||||
|
local isPlay = true
|
||||||
local maxForce = 0
|
local maxForce = 0
|
||||||
--顶部背景图
|
--顶部背景图
|
||||||
local titleBg={
|
local titleBg={
|
||||||
|
|
@ -77,6 +78,7 @@ function DailyCarbonPanel:InitComponent()
|
||||||
|
|
||||||
this.tabBox = Util.GetGameObject(this.panel, "TabBox")
|
this.tabBox = Util.GetGameObject(this.panel, "TabBox")
|
||||||
this.TabCtrl = TabBox.New()
|
this.TabCtrl = TabBox.New()
|
||||||
|
isPlay = true
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyCarbonPanel:BindEvent()
|
function DailyCarbonPanel:BindEvent()
|
||||||
|
|
@ -114,7 +116,7 @@ function DailyCarbonPanel:OnOpen(_carbonIndex)
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyCarbonPanel:OnShow()
|
function DailyCarbonPanel:OnShow()
|
||||||
|
isPlay = true
|
||||||
local curFormationForce = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
local curFormationForce = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
||||||
if PlayerManager.maxForce < curFormationForce then
|
if PlayerManager.maxForce < curFormationForce then
|
||||||
PlayerManager.maxForce = curFormationForce
|
PlayerManager.maxForce = curFormationForce
|
||||||
|
|
@ -155,6 +157,9 @@ end
|
||||||
|
|
||||||
--刷新面板
|
--刷新面板
|
||||||
function this.RefreshShow(i)
|
function this.RefreshShow(i)
|
||||||
|
if i ~= carbonIndex then
|
||||||
|
isPlay = true
|
||||||
|
end
|
||||||
carbonIndex = i
|
carbonIndex = i
|
||||||
curData={}
|
curData={}
|
||||||
|
|
||||||
|
|
@ -175,6 +180,11 @@ function this.SetScroll(i)
|
||||||
this.scrollView:SetData(curData,function(index,root)
|
this.scrollView:SetData(curData,function(index,root)
|
||||||
this.SetData(root,curData[index], curData[index - 1])
|
this.SetData(root,curData[index], curData[index - 1])
|
||||||
end)
|
end)
|
||||||
|
if isPlay then
|
||||||
|
isPlay = false
|
||||||
|
SecTorPlayAnimByScroll(this.scrollView)
|
||||||
|
end
|
||||||
|
|
||||||
for k,v in ipairs(curData) do
|
for k,v in ipairs(curData) do
|
||||||
if not CarbonManager.IsDailyCarbonPass(v.Id) then
|
if not CarbonManager.IsDailyCarbonPass(v.Id) then
|
||||||
curMaxOpenId = k
|
curMaxOpenId = k
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue