39 lines
861 B
C#
39 lines
861 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.EventSystems;
|
|||
|
|
|||
|
public class Choose : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
|||
|
{
|
|||
|
public bool isNoTip;
|
|||
|
public bool isShow;
|
|||
|
public GameObject Tip;
|
|||
|
public void Start()
|
|||
|
{
|
|||
|
Transform childTransform = transform.Find("Choose_Bg/Choos_Tip");
|
|||
|
Tip = childTransform.gameObject;
|
|||
|
}
|
|||
|
private void Update()
|
|||
|
{
|
|||
|
if (isShow&&isNoTip)
|
|||
|
{
|
|||
|
Tip.SetActive(true);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
Tip.SetActive(false);
|
|||
|
}
|
|||
|
}
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
|
|||
|
public void OnPointerEnter(PointerEventData eventData)
|
|||
|
{
|
|||
|
isShow = true;// <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뿪ʱ
|
|||
|
public void OnPointerExit(PointerEventData eventData)
|
|||
|
{
|
|||
|
isShow = false; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
}
|