protected void Start(Control control, TransitionType transitionTypee, int duration, AnimationAction actionHandlerr, AnimationFinishedEvaluator evaluatorHandlerr) { targetControl = control; transitionType = transitionTypee; actionHandler = actionHandlerr; evaluatorHandler = evaluatorHandlerr; counter = 0; startTime = 0; targetTime = duration; timer = DelayedCall.Start(DoAnimation, duration); }
private void DoAnimation() { if (evaluatorHandler == null || evaluatorHandler.Invoke()) { OnAnimationCompleted(); } else { actionHandler.Invoke(); counter++; timer.Start(); } }
public static DelayedCall StartAsync(Callback cb, int milliseconds) { DelayedCall dc = CreateAsync(cb, milliseconds); if (milliseconds > 0) { dc.Start(); } else if (milliseconds == 0) { dc.FireNow(); } return(dc); }