|
|
@@ -81,7 +81,6 @@ public class PopupMgr : MonoBehaviour
|
|
|
GameObject o = GameObject.Instantiate(Resources.Load<GameObject>("Prefabs/Popups/PKInviteNotice"));
|
|
|
Transform item = o.transform.Find("Item");
|
|
|
RectTransform itemRTF = item.GetComponent<RectTransform>();
|
|
|
- itemRTF.DOLocalMoveX(itemRTF.localPosition.x + itemRTF.sizeDelta.x, 0.6f);
|
|
|
item.Find("Avatar/Sprite").GetComponent<Image>().sprite = RoleMgr.GetAvatar(avatarID);
|
|
|
item.Find("Name").GetComponent<Text>().text = nickname;
|
|
|
item.Find("Tip").GetComponent<Text>().text = tip;
|
|
|
@@ -95,12 +94,14 @@ public class PopupMgr : MonoBehaviour
|
|
|
Destroy(o);
|
|
|
});
|
|
|
Sequence seq = DOTween.Sequence();
|
|
|
+ seq.Append(itemRTF.DOLocalMoveX(itemRTF.localPosition.x + itemRTF.sizeDelta.x, 0.6f));
|
|
|
seq.PrependInterval(10f);
|
|
|
seq.AppendCallback(() => {
|
|
|
if (o) {
|
|
|
Destroy(o);
|
|
|
}
|
|
|
});
|
|
|
+ seq.SetUpdate(true);
|
|
|
}
|
|
|
|
|
|
public void ShowTipTop(string text) {
|
|
|
@@ -118,8 +119,8 @@ public class PopupMgr : MonoBehaviour
|
|
|
//startPosition
|
|
|
itemRTF.localPosition = itemRTF.localPosition + Vector3.up * itemHeight;
|
|
|
//tween
|
|
|
- itemRTF.DOLocalMoveY(endY, 0.6f);
|
|
|
Sequence seq = DOTween.Sequence();
|
|
|
+ seq.Append(itemRTF.DOLocalMoveY(endY, 0.6f));
|
|
|
seq.PrependInterval(5f);
|
|
|
seq.Append(itemRTF.DOLocalMoveY(endY + itemHeight, 0.6f));
|
|
|
seq.AppendCallback(() => {
|
|
|
@@ -127,6 +128,7 @@ public class PopupMgr : MonoBehaviour
|
|
|
Destroy(tipObj);
|
|
|
}
|
|
|
});
|
|
|
+ seq.SetUpdate(true);
|
|
|
}
|
|
|
public void ClearAllTipTop() {
|
|
|
Transform tipGroup = popupRoot.Find("TipGroupTop");
|