Petition-to-the-Gods-V3/Assets/export_canvas/script/WarningAnimation.cs
2025-11-18 19:55:44 +08:00

24 lines
424 B
C#

using UnityEngine;
using UnityEngine.UI;
public class WarningAnimation : MonoBehaviour
{
private Text warningText; // ©Î TMP_Text
void OnEnable()
{
// °{Ã{®ÄªG
InvokeRepeating("Blink", 0f, 0.5f);
}
void OnDisable()
{
CancelInvoke("Blink");
}
void Blink()
{
warningText = GetComponent<Text>();
warningText.enabled = !warningText.enabled;
}
}