using HighlightPlus;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
///
/// ÎïÌå¸ßÁÁ
///
public class OnMouseObj : MonoBehaviour
{
private HighlightEffect _highlight;
private void Awake()
{
_highlight = GetComponent();
}
private void OnMouseDown()
{
if (EventSystem.current.IsPointerOverGameObject())
{
return;
}
}
private void OnMouseEnter()
{
if (EventSystem.current.IsPointerOverGameObject())
{
return;
}
Debug.Log(gameObject.name);
_highlight.highlighted = true;
Vector3 pos = Camera.main.WorldToScreenPoint(transform.position);
TipItem.Instance.ShwoTips(this.gameObject.name, pos);
}
private void OnMouseExit()
{
if (EventSystem.current.IsPointerOverGameObject())
{
return;
}
_highlight.highlighted = false;
TipItem.Instance.HideTips();
}
}