39 lines
832 B
C#
39 lines
832 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
public class BackUI : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
|
{
|
|
/// <summary>
|
|
/// 选中显示图片
|
|
/// </summary>
|
|
public Sprite Picture_选中;
|
|
/// <summary>
|
|
/// 未选中显示图片
|
|
/// </summary>
|
|
public Sprite Picture_未选中;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void OnPointerEnter(PointerEventData eventData)
|
|
{
|
|
this.GetComponent<Image>().sprite = Picture_选中;
|
|
}
|
|
|
|
public void OnPointerExit(PointerEventData eventData)
|
|
{
|
|
this.GetComponent<Image>().sprite = Picture_未选中;
|
|
}
|
|
}
|