ShanxiKnowledgeBase/SXElectricityFaultA&E/Assets/Scripts/Alone/SceneToolsBtOnClick.cs

33 lines
830 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using MotionFramework;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class SceneToolsBtOnClick : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public GameObject textGame;
public GameObject selectGame;
private void Start()
{
this.GetComponent<Button>().onClick.AddListener(delegate
{
MotionEngine.GetModule<ToolsPackManager>().OnTriggerStringEvent(this.name);
});
}
public void OnPointerEnter(PointerEventData eventData)
{
textGame.SetActive(true);
selectGame.SetActive(true);
}
public void OnPointerExit(PointerEventData eventData)
{
textGame.SetActive(false);
selectGame.SetActive(false);
}
}