chenxin
2020-12-02 54181477c210344b037d88f17dbe2cddc5cbc930
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;
    }
}