示例#1
0
 public void RunCommand(string command, DoneHandler done = null)
 {
     //AddText(command + "\r\n");
     this.runner.Run(command, () =>
     {
         done?.Invoke();
     });
 }
示例#2
0
        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);
        }