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.
19 lines
474 B
19 lines
474 B
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// this class is used to handle coroutine
|
|
/// </summary>
|
|
public class CoroutineHandler : MonoSingleton<CoroutineHandler>
|
|
{
|
|
public void DelayCall(float delay, System.Action callback)
|
|
{
|
|
StartCoroutine(DelayCallCoroutine(delay, callback));
|
|
}
|
|
|
|
IEnumerator DelayCallCoroutine(float delay, System.Action callback)
|
|
{
|
|
yield return new WaitForSeconds(delay);
|
|
callback();
|
|
}
|
|
}
|