47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| using UnityEngine;
 | |
| using UnityEngine.UI;
 | |
| using DG.Tweening;
 | |
| 
 | |
| namespace MMO
 | |
| {
 | |
|     public class MMOUIHelp : MMOUIBase
 | |
|     {
 | |
|         [SerializeField] CanvasGroup mCvsBg;
 | |
|         [SerializeField] RectTransform mRctBg;
 | |
| 
 | |
|         [SerializeField] Button mBtnClose;
 | |
|         [SerializeField] Button mBtnContact;
 | |
| 
 | |
|         protected override void OnInit()
 | |
|         {
 | |
|             base.OnInit();
 | |
| 
 | |
|             BindBtn(mBtnClose, OnClickClose);
 | |
|             BindBtn(mBtnContact, OnClickContact);
 | |
|         }
 | |
| 
 | |
|         public override void OnOpen()
 | |
|         {
 | |
|             base.OnOpen();
 | |
| 
 | |
|             mCvsBg.alpha = 0;
 | |
|             mRctBg.anchoredPosition = new Vector2(0, -160);
 | |
| 
 | |
|             mCvsBg.DOFade(1, 0.3f);
 | |
|             mRctBg.DOAnchorPosY(0, 0.3f);
 | |
|         }
 | |
| 
 | |
|         private void OnClickClose()
 | |
|         {
 | |
|             mCvsBg.DOFade(0, 0.3f);
 | |
|             mRctBg.DOAnchorPosY(-160, 0.3f).onComplete = Close;
 | |
|         }
 | |
| 
 | |
|         private void OnClickContact()
 | |
|         {
 | |
|             Application.OpenURL(string.Format("mailto:{0}?subject={1}", "Dev@hotpotgame.com", Application.productName.Replace(" ", ""))); 
 | |
|         }
 | |
|     }
 | |
| } |