public APExecutionTracker(GenCtxProperties <AsyncPattern> props, AsyncHandoff abh, out bool isClipped) { looper = new LoopControl <AsyncPattern>(props, abh.ch, out isClipped); this.abh = abh; parent_done = abh.done; abh.done = () => { }; elapsedFrames = 0f; wasPaused = false; }
public SMExecutionTracker(GenCtxProperties <StateMachine> props, SMHandoff smh, out bool isClipped) { looper = new LoopControl <StateMachine>(props, smh.ch, out isClipped); this.smh = smh; this.smh.CanPrepend = true; waitChild = props.waitChild; sequential = props.sequential; checkIsChildDone = null; }
public IPExecutionTracker(GenCtxProperties <AsyncPattern> props, AsyncHandoff abh, out bool isClipped) { looper = new LoopControl <AsyncPattern>(props, abh.ch, out isClipped); this.abh = abh; parent_done = abh.done; abh.done = () => { }; elapsedFrames = 0f; waitChild = props.waitChild; sequential = props.sequential; checkIsChildDone = null; wasPaused = false; }
public static AsyncPattern GCRepeat(GenCtxProperties <AsyncPattern> props, SyncPattern[] target) { IEnumerator Inner(AsyncHandoff abh) { APExecutionTracker tracker = new APExecutionTracker(props, abh, out bool isClipped); if (isClipped) { tracker.AllSDone(false); yield break; } if (tracker.CleanupIfCancelled()) { yield break; } for (tracker.StartInitialDelay(); tracker.IsWaiting; tracker.WaitStep()) { yield return(null); if (tracker.CleanupIfCancelled()) { yield break; } } while (tracker.RemainsExceptLast && tracker.PrepareIteration()) { tracker.DoSIteration(target); for (tracker.StartWait(); tracker.IsWaiting; tracker.WaitStep()) { yield return(null); if (tracker.CleanupIfCancelled()) { yield break; } } tracker.FinishIteration(); } if (tracker.PrepareLastIteration()) { tracker.DoSIteration(target); tracker.FinishIteration(); } tracker.AllSDone(true); } return(Inner); }
public SPExecutionTracker(GenCtxProperties <SyncPattern> props, SyncHandoff sbh, out bool isClipped) { looper = new LoopControl <SyncPattern>(props, sbh.ch, out isClipped); this.sbh = sbh; }