CQ_Intelligent-Technology-T.../Assets/Scripts/智慧交通/ImageTips.cs

33 lines
695 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UIElements;
public class ImageTips : MonoBehaviour
{
public static ImageTips instance;
/// <summary>
/// 提示面板
/// </summary>
public GameObject TipPanel;
/// <summary>
/// 提示内容
/// </summary>
public TextMeshProUGUI Tips;
private void Awake()
{
instance = this;
}
/// <summary>
/// 显示提示等待2秒后消失
/// </summary>
/// <returns></returns>
public IEnumerator WaitHide()
{
TipPanel.SetActive(true);
yield return new WaitForSeconds(2);
TipPanel.SetActive(false);
}
}