36 lines
541 B
C#
36 lines
541 B
C#
|
|
using DG.Tweening;
|
||
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
using UnityEngine.EventSystems;
|
||
|
|
|
||
|
|
public class PointAnimItem : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
||
|
|
{
|
||
|
|
DOTweenAnimation anim;
|
||
|
|
|
||
|
|
private void Awake()
|
||
|
|
{
|
||
|
|
anim = GetComponent<DOTweenAnimation>();
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
public void OnPointerEnter(PointerEventData eventData)
|
||
|
|
{
|
||
|
|
anim?.DOPause();
|
||
|
|
}
|
||
|
|
|
||
|
|
public void OnPointerExit(PointerEventData eventData)
|
||
|
|
{
|
||
|
|
anim?.DOPlay();
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|