Merge branch 'game' of http://127.0.0.1:3000/fatiao/ro-webgl into game
This commit is contained in:
commit
102b43d009
@ -2138,9 +2138,11 @@ function UILiveRoomView:Init_FloatingHeart(itemlua)
|
||||
v.active = false
|
||||
v.canvasGroup.alpha = 0
|
||||
end
|
||||
itemlua.floatingHeart:SetActive(true)
|
||||
end
|
||||
|
||||
function UILiveRoomView:Gen_FloatingHeart(itemlua)
|
||||
|
||||
self.FloatingHeart = {
|
||||
[1] = itemlua.floatingHeart.item1,
|
||||
[2] = itemlua.floatingHeart.item2,
|
||||
@ -2164,20 +2166,23 @@ function UILiveRoomView:Gen_FloatingHeart(itemlua)
|
||||
local screenWidth = UnityEngine.Screen.width
|
||||
local screenHeight = UnityEngine.Screen.height
|
||||
|
||||
local endPos = Vector2(-screenWidth+145-center.x, screenHeight-100-center.y)
|
||||
local endPos = Vector2(-screenWidth+146-center.x, screenHeight-100-center.y)
|
||||
|
||||
local item = self.FloatingHeart[id]
|
||||
|
||||
item.transform.localPosition = Vector2(0,0)
|
||||
item.transform.localScale = Vector3(1, 1, 1)
|
||||
local time1 = 0.5
|
||||
|
||||
local seq = DG.Tweening.DOTween.Sequence()
|
||||
seq:Append(item.transform:DOLocalMoveY(70, time1))
|
||||
seq:Join(item.canvasGroup:DOFade(1, time1 * 0.6))
|
||||
--seq:AppendInterval(0.3)
|
||||
seq:Append(item.transform:DOLocalMove(endPos,2))
|
||||
seq:Append(item.canvasGroup:DOFade(0, time1))
|
||||
seq:Append(item.transform:DOLocalMove(endPos,1.5))
|
||||
seq:Join(item.transform:DOScale(Vector3(0.65,0.65,0.65), 1.2))
|
||||
seq:Append(item.canvasGroup:DOFade(0, time1*0.6))
|
||||
seq:OnComplete(function()
|
||||
self:RefreshHeart(itemlua)
|
||||
item.active = false
|
||||
end)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user