using UnityEngine;
|
using UnityEngine.EventSystems;
|
|
public class ImageSkillRim : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
{
|
ImageSkill imageSkill;
|
|
public void OnPointerEnter(PointerEventData eventData)
|
{
|
if (imageSkill.IsDraging)
|
{
|
imageSkill.SetTarget(gameObject);
|
}
|
}
|
|
public void OnPointerExit(PointerEventData eventData)
|
{
|
if (imageSkill.IsDraging)
|
{
|
imageSkill.SetTarget(null);
|
}
|
}
|
|
// Start is called before the first frame update
|
void Start()
|
{
|
imageSkill = transform.parent.Find("Image_Skill").GetComponent<ImageSkill>();
|
}
|
|
|
}
|