wangguan
2020-12-09 f160929f79f942c08623683bb7b7175868544a83
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using UnityEngine;
using UnityEngine.EventSystems;
using KTGMGemClient;
public class ImageTowerPos : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
    GuideImageBase tmpImageBase;
 
    public void OnPointerEnter(PointerEventData eventData)
    {
        if (tmpImageBase.IsDraging)
        {
            tmpImageBase.SetTarget(gameObject);
        }
    }
 
    public void OnPointerExit(PointerEventData eventData)
    {
        if (tmpImageBase.IsDraging)
        {
            tmpImageBase.SetTarget(null);
        }
    }
 
    public void Init(GuideImageBase imageBase)
    {
        tmpImageBase = imageBase;
    }
}