public void RunCommand(string command, DoneHandler done = null) { //AddText(command + "\r\n"); this.runner.Run(command, () => { done?.Invoke(); }); }
private static IEnumerator WaitWhileTrueCoroutine(Func <bool> condition, DoneHandler callback, float timeoutSeconds, bool reverseCondition = false) { while ((timeoutSeconds > 0) && (condition.Invoke() == !reverseCondition)) { timeoutSeconds -= Time.deltaTime; yield return(null); } callback.Invoke(timeoutSeconds > 0); }