幸运探宝增加动效
parent
60a335684d
commit
6be45b4e89
|
|
@ -20,7 +20,7 @@ local TableTurnType={
|
|||
Normal=1,--默认旋转
|
||||
Expedite=2,--加快旋转
|
||||
}
|
||||
|
||||
local isPlayAnim = true
|
||||
local curTurnPos=1 --当前位置
|
||||
this.thread=nil --协程
|
||||
|
||||
|
|
@ -125,6 +125,7 @@ function LuckyTurnTablePanel:BindEvent()
|
|||
--幸运探宝按钮
|
||||
Util.AddClick(this.luckyTreasureBtn, function()
|
||||
--Log("==YSP==点击幸运探宝按钮")
|
||||
isPlayAnim = true
|
||||
if LuckyTurnTableManager.curTreasureType==TreasureType.Lucky then
|
||||
return
|
||||
end
|
||||
|
|
@ -133,6 +134,7 @@ function LuckyTurnTablePanel:BindEvent()
|
|||
--高级探宝按钮
|
||||
Util.AddClick(this.advancedTreasureBtn, function()
|
||||
--Log("==YSP==点击高级探宝按钮")
|
||||
isPlayAnim = true
|
||||
if LuckyTurnTableManager.curTreasureType==TreasureType.Advanced then
|
||||
return
|
||||
end
|
||||
|
|
@ -167,6 +169,7 @@ end
|
|||
|
||||
---界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function LuckyTurnTablePanel:OnShow()
|
||||
isPlayAnim = true
|
||||
if LuckyTurnTableManager.curTreasureType==TreasureType.Lucky then--防止当前为高级探宝时 按下探宝后跳转到幸运探宝
|
||||
this.LuckyTurnOnShow(TreasureType.Lucky)
|
||||
elseif LuckyTurnTableManager.curTreasureType==TreasureType.Advanced then
|
||||
|
|
@ -556,11 +559,40 @@ end
|
|||
|
||||
---设置跑马灯物品显示 func确保先生成itemview 再置灰
|
||||
function this.SetItemViewShow(data,func)
|
||||
local list={}
|
||||
for i = 1, #this.itemViewList do
|
||||
LogPink(data[i].luckId)
|
||||
-- LogPink(data[i].luckId)
|
||||
local tab={LuckyTurnTableManager.dialRewardConfig[data[i].luckId].Reward[1],LuckyTurnTableManager.dialRewardConfig[data[i].luckId].Reward[2]}
|
||||
this.itemViewList[i]:OnOpen(false, {tab[1],tab[2]},1, false, false, false, sortingOrder)
|
||||
list[i] = this.itemViewList[i].gameObject
|
||||
if isPlayAnim then
|
||||
this.itemViewList[i].gameObject:SetActive(false)
|
||||
end
|
||||
end
|
||||
if isPlayAnim then
|
||||
local vec = Vector3.zero
|
||||
for i = 1, #list do
|
||||
Timer.New(function ()
|
||||
list[i].gameObject:SetActive(true)
|
||||
PlayUIAnim(list[i].gameObject)
|
||||
|
||||
Timer.New(function ()
|
||||
DoTween.To(
|
||||
DG.Tweening.Core.DOGetter_float( function () return 1.15 end),
|
||||
DG.Tweening.Core.DOSetter_float(function (progress)
|
||||
Log(progress)
|
||||
vec.x = progress
|
||||
vec.y = progress
|
||||
vec.z = progress
|
||||
list[i]:GetComponent("RectTransform").localScale = vec
|
||||
end),
|
||||
1.00, 0.2):SetEase(Ease.Linear):OnComplete(function()end)
|
||||
end,0.3):Start()
|
||||
end,0.05*(i-1)):Start()
|
||||
end
|
||||
isPlayAnim = false
|
||||
end
|
||||
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue