44 lines
		
	
	
		
			933 B
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			933 B
		
	
	
	
		
			C#
		
	
	
	
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| using UnityEngine;
 | |
| using UnityEngine.UI;
 | |
| using DG.Tweening;
 | |
| 
 | |
| public class PanelNoAdsTip : BasePanel
 | |
| {
 | |
|     [SerializeField] CanvasGroup mCvsBg;
 | |
|     [SerializeField] RectTransform mRctBg;
 | |
| 
 | |
|     [SerializeField] Button mBtnMask;
 | |
| 
 | |
|     private void Awake()
 | |
|     {
 | |
|         UIUtils.BindBtn(mBtnMask, OnClickMask);
 | |
|     }
 | |
| 
 | |
|     public override void OnOpen()
 | |
|     {
 | |
|         base.OnOpen();
 | |
| 
 | |
|         mCvsBg.alpha = 0;
 | |
|         mRctBg.anchoredPosition = new Vector2(0, -160);
 | |
| 
 | |
|         mCvsBg.DOFade(1, 0.3f);
 | |
|         mRctBg.DOAnchorPosY(100, 0.3f);
 | |
| 
 | |
|         AudioManager.Instance.PlaySound(AudioType.Click_Tip);
 | |
|     }
 | |
| 
 | |
|     public override void OnClose()
 | |
|     {
 | |
|         base.OnClose();
 | |
| 
 | |
|         AudioManager.Instance.PlaySound(AudioType.UIClose);
 | |
|     }
 | |
| 
 | |
|     private void OnClickMask()
 | |
|     {
 | |
|         mCvsBg.DOFade(0, 0.3f);
 | |
|         mRctBg.DOAnchorPosY(-160, 0.3f).onComplete = Close;
 | |
|     }
 | |
| } |