NG_/Assets/Scripts/UI/设备运维/管道/PipelineShow.cs
2024-12-13 19:40:05 +08:00

29 lines
649 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class PipelineShow : MonoBehaviour, IPointerClickHandler
{
public GameObject pipeline; // 管道
public Image backImage; // 背景图片
void Update()
{
}
public void OnPointerClick(PointerEventData eventData)
{
pipeline.SetActive(!pipeline.activeSelf);
if (pipeline.activeSelf)
{
backImage.color = new Color(0, 0.8f, 0, 0.5f);
}
else
{
backImage.color = new Color(1, 1f, 1, 1f);
}
}
}