static void Main(string[] args) { bool continueRun = true; while (continueRun == true) { continueRun = LoopMethod.LogicLoop(continueRun); } }
protected AnimationEvent(AnimationEventData animationEventData) { actor = animationEventData.actor; destination = animationEventData.destination; maxTime = animationEventData.maxTime; smoothing = animationEventData.smoothing; loopMethod = animationEventData.loopMethod; isRelative = animationEventData.isRelative; body = animationEventData.body; callback = animationEventData.callback; resetAfterDone = animationEventData.resetAferDone; }
public static bool Loop(LoopMethod loopMethod, ref int x, ref int step, int max) { switch (loopMethod) { case LoopMethod.PlayOnce: if (x > max) { x = max; return(true); } break; case LoopMethod.Loop: if (x > max) { x = 0; } break; case LoopMethod.PingPongOnce: if (x > max) { step = -1; x = max; } if (x < 0) { x = 0; return(true); } break; case LoopMethod.PingPongLoop: if (x > max) { step = -1; x = max; } if (x <= 0) { step = 1; } break; } return(false); }
public static Rest <T> Loop <T>(Rest <T> rest, int count) { var loop = new LoopMethod <T>(rest, count); return(loop.LoopAsync); }