IEnumerator InvokeRepeating(GameEvent.FuncNoTime f) { while (true) { yield return(new WaitForFixedUpdate()); if (f() == true) { break; } } }
public void AddEvent(GameEvent.FuncNoTime f) { StartCoroutine(InvokeRepeating(f)); }