You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
603 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
using UnityEngine.UI;
public class ErrorTip : MonoBehaviour
{
Text text;
float time;//³ÖÐøʱ³¤
private void Awake()
{
text = GetComponentInChildren<Text>();
}
public void InitThis(string content,float t=2.5f) {
GetComponent<CanvasGroup>().alpha = 1;
GetComponentInChildren<DialoguePlay>().PlayText(content,0.02f);
time = t;
Invoke("CloseTip", time);
}
public void CloseTip() {
GetComponent<CanvasGroup>().alpha = 0;
}
}