1234567891011121314151617 |
- using UnityEngine;
- using System.Collections;
- public class DelayCall : MonoBehaviour
- {
- /// <summary>
- /// eg: StartCoroutine(DelayCall.Call(callback, delay))
- /// </summary>
- /// <param name="callback"></param>
- /// <param name="delay"></param>
- /// <returns></returns>
- public static IEnumerator Call(System.Action callback, float delay)
- {
- yield return new WaitForSeconds(delay);
- callback();
- }
- }
|