49 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using UnityEngine;
 | |
| using UnityEngine.UI;
 | |
| using DG.Tweening;
 | |
| 
 | |
| namespace MMO
 | |
| {
 | |
|     public class MMOGuideTap : MMOGuideStep
 | |
|     {
 | |
|         //[SerializeField] Vector2 mInitArea;
 | |
|         //[SerializeField] Vector2 mFinalArea;
 | |
|         [SerializeField] RectTransform mRctFocusArea;
 | |
|         [SerializeField] Button mBtnExcute;
 | |
|         [SerializeField] GameObject mGobTip;
 | |
| 
 | |
|         private bool mEnabled = false;
 | |
| 
 | |
|         private void Awake()
 | |
|         {
 | |
|             mBtnExcute.onClick.AddListener(OnClickExcute);
 | |
|         }
 | |
| 
 | |
|         private void OnEnable()
 | |
|         {
 | |
|             //mEnabled = false;
 | |
|             //mGobTip.SetActive(false);
 | |
| 
 | |
|             //mRctFocusArea.sizeDelta = mInitArea;
 | |
|             //mRctFocusArea.DOSizeDelta(mFinalArea, 0.5f).SetEase(Ease.Linear).onComplete = EnableStep;
 | |
| 
 | |
|             EnableStep();
 | |
|         }
 | |
| 
 | |
|         private void EnableStep()
 | |
|         {
 | |
|             mEnabled = true;
 | |
|             mGobTip.SetActive(true);
 | |
|         }
 | |
| 
 | |
|         private void OnClickExcute()
 | |
|         {
 | |
|             if (!mEnabled)
 | |
|                 return;
 | |
| 
 | |
|             DelExcute?.Invoke();
 | |
|         }
 | |
|     }
 | |
| } |