57 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			57 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
|  | using System.Collections; | |||
|  | using System.Collections.Generic; | |||
|  | using UnityEngine; | |||
|  | using UnityEngine.UI; | |||
|  | using DG.Tweening; | |||
|  | #if USE_IAP | |||
|  | using UnityEngine.Purchasing; | |||
|  | #endif | |||
|  | 
 | |||
|  | public class PanelVip : BasePanel | |||
|  | { | |||
|  |     [SerializeField] CanvasGroup mCvsBg; | |||
|  |     [SerializeField] RectTransform mRctBg; | |||
|  | 
 | |||
|  |     [SerializeField] Text mTxtPrice; | |||
|  | 
 | |||
|  |     [SerializeField] Button mBtnClose; | |||
|  |     [SerializeField] Button mBtnSubscribe; | |||
|  |     [SerializeField] Button mBtnGet; | |||
|  | 
 | |||
|  |     private void Awake() | |||
|  |     { | |||
|  |         UIUtils.BindBtn(mBtnClose, OnClickClose); | |||
|  |         UIUtils.BindBtn(mBtnSubscribe, OnClickSubscribe); | |||
|  |         UIUtils.BindBtn(mBtnGet, OnClickGet); | |||
|  | 
 | |||
|  | #if USE_IAP | |||
|  | 
 | |||
|  | #endif | |||
|  |     } | |||
|  | 
 | |||
|  |     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); | |||
|  |     } | |||
|  | 
 | |||
|  |     private void OnClickClose() | |||
|  |     { | |||
|  |         mCvsBg.DOFade(0, 0.3f); | |||
|  |         mRctBg.DOAnchorPosY(-160, 0.3f).onComplete = Close; | |||
|  |     } | |||
|  | 
 | |||
|  |     private void OnClickSubscribe() | |||
|  |     { | |||
|  | 
 | |||
|  |     } | |||
|  | 
 | |||
|  |     private void OnClickGet() | |||
|  |     { | |||
|  | 
 | |||
|  |     } | |||
|  | } |