using DG.Tweening;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
///
/// 手指动画类型
///
public enum E_HandAniKindType
{
///
/// 点击
///
Tap,
///
/// 滑
///
Slide,
///
/// 双击
///
DoubleClick,
}
///
/// 遮罩形状类型
///
public enum E_FocusType
{
///
/// 方形
///
Square,
///
/// 圆形
///
Round,
}
///
/// 引导UI
///
public class TeachUI : UIBaseClass
{
///
/// 遮罩形状
///
public Image focus;
///
/// 点击事件
///
public Image tapEvent;
///
/// 聚焦底图
///
public Image focusBM;
///
/// 对话类容
///
public TextMeshProUGUI talkText;
///
/// 带点按钮
///
public Button withDotsBtn;
///
/// 聚焦RectTransform
///
public RectTransform lookRect;
///
/// 聚焦对象
///
public GameObject lookNode;
///
/// 指引对象
///
public GameObject handNode;
///
/// 指引动画
///
public Animator handAni;
///
/// 对话对象
///
public GameObject talkObj;
///
/// 上点
///
public Transform upPoint;
///
/// 遮罩背景
///
public CanvasGroup maskBGCG;
///
/// 引导提示
///
public CanvasGroup dialogueCG;
///
/// 手指
///
public CanvasGroup guidelinesCG;
public override void OnShow()
{
base.OnShow();
HideAll();
SetTapEvent(false);
dialogueCG.alpha = 0;
guidelinesCG.alpha = 0;
maskBGCG.alpha = 0;
}
///
/// 设置聚焦
///
/// 位置
/// 大小
/// 点击事件
public void SetLookState(Vector3 pos, bool isUI,Vector2 size)
{
SetMaskBGCG(true);
lookNode.gameObject.SetActive(true);
if (isUI)
{
lookRect.position = pos;
}
else
{
bool isRect = RectTransformUtility.ScreenPointToLocalPointInRectangle(GetComponent