33 lines
695 B
C#
33 lines
695 B
C#
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);
|
||
}
|
||
}
|