
Untitled
By: a guest on
Apr 30th, 2012 | syntax:
C# | size: 0.29 KB | hits: 16 | expires: Never
// Neat random snippet to put in a MonoBehaviour base class (for people who love lambdas)
IEnumerator Do(System.Action action, float time)
{
yield return new WaitForSeconds(time);
action();
}
void Invoke(System.Action action, float time)
{
StartCoroutine(Do(action, time));
}