26 lines
619 B
C#
26 lines
619 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
public class DeviceItemComponent : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
|
|
{
|
|
public Sprite[] showTips;
|
|
|
|
public void SetFirstDefault()
|
|
{
|
|
GetComponent<Image>().sprite = showTips[0];
|
|
}
|
|
public void OnPointerEnter(PointerEventData eventData)
|
|
{
|
|
GetComponent<Image>().sprite = showTips[0];
|
|
}
|
|
|
|
public void OnPointerExit(PointerEventData eventData)
|
|
{
|
|
GetComponent<Image>().sprite = showTips[1];
|
|
}
|
|
}
|