35 lines
		
	
	
		
			768 B
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			768 B
		
	
	
	
		
			C#
		
	
	
	
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| using UnityEngine;
 | |
| using UnityEngine.UI;
 | |
| using DG.Tweening;
 | |
| 
 | |
| public class PanelTips : BasePanel
 | |
| {
 | |
|     [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 ShowTips(string pTipStr)
 | |
|     {
 | |
|         mTxtTip.text = pTipStr;
 | |
|     }
 | |
| } |