wangguan
2020-11-06 f6abd3f706541c72633daa84ba2b47ba1a003d02
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
29
30
31
using UnityEngine;
using UnityEngine.EventSystems;
using KTGMGemClient;
public class ImageTowerPos : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
    ImageFire1 imageFire1;
 
    public void OnPointerEnter(PointerEventData eventData)
    {
        if (imageFire1.IsDraging)
        {
            imageFire1.SetTarget(gameObject);
        }
    }
 
    public void OnPointerExit(PointerEventData eventData)
    {
        if (imageFire1.IsDraging)
        {
            imageFire1.SetTarget(null);
        }
    }
 
    // Start is called before the first frame update
    void Start()
    {
        imageFire1 = transform.parent.Find("Image_Fire1").GetComponent<ImageFire1>();
    }
 
 
}