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.
26 lines
486 B
26 lines
486 B
2 years ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using DG.Tweening;
|
||
|
using UnityEngine.UI;
|
||
|
public class ToolTip : MonoBehaviour
|
||
|
{
|
||
|
Text text;
|
||
|
private void OnEnable()
|
||
|
{
|
||
|
text = GetComponent<Text>();
|
||
|
//WaitClose();
|
||
|
Invoke("Close", 4);
|
||
|
}
|
||
|
|
||
|
void WaitClose()
|
||
|
{
|
||
|
text.DOColor(new Color(text.color.r, text.color.g, text.color.b, 0), 4);
|
||
|
}
|
||
|
|
||
|
void Close()
|
||
|
{
|
||
|
gameObject.SetActive(false);
|
||
|
}
|
||
|
}
|