Пример #1
0
 public Gate? this[int duration] {
     get{
         Notices.OnEnter(ref frame, this);
         return((++elapsed > duration) ? done(log && $"[0]")
            : cont(log && $"[{duration-elapsed}]"));
     }
 }
Пример #2
0
 public Gate? this[float duration] {
     get{
         Notices.OnEnter(ref frame, this);
         return(((elapsed += UnityEngine.Time.deltaTime) >= duration)
            ? done(log && $"[0.0]")
                    : cont(log && $"[{duration-elapsed:0.0}]"));
     }
 }
Пример #3
0
 public status this[float duration] {
     get{
         Notices.OnEnter(ref frame, this);
         stamp = stamp ?? time;
         var elapsed = time - stamp.Value;
         return(elapsed > delay
        ? done(log && $"[0.0]")
        : cont(log && $"[{delay - elapsed:0.0}]"));
     }
 }
Пример #4
0
 public Gate?this[bool @in, bool @out] {
     get{
         Notices.OnEnter(ref frame, this);
         return((passing = passing ? !@out : @in) ? done() : fail());
     }
 }
Пример #5
0
 public Gate?this[bool cond] {
     get{
         Notices.OnEnter(ref frame, this);
         return((passing |= cond) ? done() : fail());
     }
 }