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

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