/// <summary>
 /// the signal times out automatically, so specify the time out time according your needs. Autoreset
 /// means that the enumerator is reusable right after it has been completed without calling Reset()
 /// explicitly
 /// </summary>
 /// <param name="name"></param>
 /// <param name="timeout"></param>
 /// <param name="autoreset"></param>
 public WaitForSignalEnumerator(string name, float timeout = 1000, bool autoreset = true, bool startUnlocked = false)
 {
     _waitBack       = new WaitBackC(timeout, !startUnlocked);
     _initialTimeOut = timeout;
     _autoreset      = autoreset;
     _name           = name;
     _signal         = startUnlocked;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// the signal times out automatically, so specify the time out time according your needs. Autoreset
 /// means that the enumerator is reusable right after it has been completed without calling Reset()
 /// explicitly
 /// </summary>
 /// <param name="name"></param>
 /// <param name="timeout"></param>
 /// <param name="autoreset"></param>
 public WaitForSignal(string name, float timeout = 1000, bool autoreset = true, bool startUnlocked = false)
 {
     _waitBack = new WaitBackC(timeout, !startUnlocked);
     _wait     = new WaitBackC(timeout, startUnlocked);
 }