ShanxiKnowledgeBase/SXElectricityInformationAcq.../Assets/taoruiqi/Script/InteractiveObjects.cs

33 lines
587 B
C#

using HighlightPlus;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// ¿É½»»¥ÎïÌå¸ßÁÁ
/// </summary>
public class InteractiveObjects : MonoBehaviour
{
private HighlightEffect _highlight;
private void Awake()
{
_highlight = this.GetComponent<HighlightEffect>();
}
private void OnEnable()
{
_highlight.highlighted = false;
}
private void OnMouseEnter()
{
_highlight.highlighted = true;
}
private void OnMouseExit()
{
_highlight.highlighted = false;
}
}