38 lines
		
	
	
		
			871 B
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			871 B
		
	
	
	
		
			C#
		
	
	
	
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| using UnityEngine;
 | |
| using UnityEngine.UI;
 | |
| using DG.Tweening;
 | |
| 
 | |
| namespace MMO
 | |
| {
 | |
|     public class MMOUITip : MMOUIBase
 | |
|     {
 | |
|         [SerializeField] CanvasGroup mCvsBg;
 | |
|         [SerializeField] RectTransform mRctBg;
 | |
| 
 | |
|         [SerializeField] Text mTxtTip;
 | |
| 
 | |
|         public override void OnOpen()
 | |
|         {
 | |
|             base.OnOpen();
 | |
| 
 | |
|             mCvsBg.alpha = 0;
 | |
|             mRctBg.anchoredPosition = new Vector2(0, -100);
 | |
| 
 | |
|             mCvsBg.DOKill();
 | |
|             mRctBg.DOKill();
 | |
| 
 | |
|             mCvsBg.DOFade(1, 0.3f);
 | |
|             mRctBg.DOAnchorPosY(100, 0.3f);
 | |
| 
 | |
|             mCvsBg.DOFade(0, 0.3f).SetDelay(1.3f);
 | |
|             mRctBg.DOAnchorPosY(-100, 0.3f).SetDelay(1.3f).onComplete = Close;
 | |
|         }
 | |
| 
 | |
|         public void SetTip(string pTipStr)
 | |
|         {
 | |
|             mTxtTip.text = pTipStr;
 | |
|         }
 | |
|     }
 | |
| } |