using System.Collections; using UnityEngine; /// /// this class is used to handle coroutine /// public class CoroutineHandler : MonoSingleton { 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(); } }