Passion & UI

This commit is contained in:
SoulliesOfficial
2026-06-12 17:11:39 -04:00
parent 7bc1e1722c
commit 6d7ebc5825
3444 changed files with 865284 additions and 463132 deletions

View File

@@ -0,0 +1,41 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
namespace Michsky.UI.Shift
{
public class TimedEvent : MonoBehaviour
{
[Header("Timing (seconds)")]
public float timer = 4;
public bool enableAtStart;
[Header("Timer Event")]
public UnityEvent timerAction;
void Start()
{
if(enableAtStart == true)
{
StartCoroutine("TimedEventStart");
}
}
IEnumerator TimedEventStart()
{
yield return new WaitForSeconds(timer);
timerAction.Invoke();
}
public void StartIEnumerator ()
{
StartCoroutine("TimedEventStart");
}
public void StopIEnumerator ()
{
StopCoroutine("TimedEventStart");
}
}
}