| | |
| | | using UnityEngine.UI; |
| | | using System.Drawing; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using EnhancedUI.EnhancedScroller; |
| | | using TMPro; |
| | | using DG.Tweening; |
| | |
| | | public Image icon; |
| | | public Image backGround; |
| | | |
| | | private RectTransform rt; |
| | | |
| | | /// <summary> |
| | | /// Start is called on the frame when a script is enabled just before |
| | | /// any of the Update methods is called the first time. |
| | | /// </summary> |
| | | void Awake() |
| | | { |
| | | offect = Vector3.zero; |
| | | rt = transform.GetComponent<RectTransform>(); |
| | | } |
| | | |
| | | Vector3 offect; |
| | | public void SetData(FinalPanelItemData data) |
| | | { |
| | | playerNameTxt.text = data.playerName; |
| | |
| | | indexTxt.text = data.index.ToString(); |
| | | } |
| | | backGround.sprite = data.spriteBackGround; |
| | | if (rt != null) |
| | | { |
| | | offect.x = rt.anchoredPosition3D.x; |
| | | offect.y = rt.anchoredPosition3D.y; |
| | | |
| | | rt.anchoredPosition3D = offect; |
| | | } |
| | | } |
| | | |
| | | public void SetPos() |
| | |
| | | |
| | | public void PlayDoTween(float duration) |
| | | { |
| | | Sequence agentTweenSeq = DOTween.Sequence(); |
| | | agentTweenSeq.Append(backGround.rectTransform.DOAnchorPosX(0, duration)); |
| | | //Sequence agentTweenSeq = DOTween.Sequence(); |
| | | //agentTweenSeq.Join(backGround.rectTransform.DOAnchorPosX(0, duration)); |
| | | backGround.rectTransform.DOAnchorPosX(0, duration); |
| | | } |
| | | } |