Beispiel #1
0
 /// <summary>
 ///     Starts the playing of the animation
 /// </summary>
 /// <param name="frameCallback">
 ///     The callback to get invoked at each frame
 /// </param>
 /// <param name="endCallback">
 ///     The callback to get invoked at the end of the animation
 /// </param>
 public void Play(SafeInvoker <Float3D> frameCallback, SafeInvoker endCallback)
 {
     Stop();
     FrameCallback = frameCallback;
     EndCallback   = endCallback;
     IsEnded       = false;
     HorizontalAnimator.Play(
         new SafeInvoker <float>(
             value =>
     {
         XValue = value;
         InvokeSetter();
     }),
         new SafeInvoker(InvokeFinisher));
     VerticalAnimator.Play(
         new SafeInvoker <float>(
             value =>
     {
         YValue = value;
         InvokeSetter();
     }),
         new SafeInvoker(InvokeFinisher));
     DepthAnimator.Play(
         new SafeInvoker <float>(
             value =>
     {
         ZValue = value;
         InvokeSetter();
     }),
         new SafeInvoker(InvokeFinisher));
 }
Beispiel #2
0
 /// <summary>
 ///     Stops the animation and resets its status, resume is no longer possible
 /// </summary>
 public virtual void Stop()
 {
     HorizontalAnimator.Stop();
     VerticalAnimator.Stop();
     DepthAnimator.Stop();
     XValue = YValue = ZValue = null;
 }
 /// <summary>
 ///     Resume the animation from where it paused
 /// </summary>
 public virtual void Resume()
 {
     if (CurrentStatus == AnimatorStatus.Paused)
     {
         HorizontalAnimator.Resume();
         VerticalAnimator.Resume();
     }
 }
 /// <summary>
 ///     Pause the animation
 /// </summary>
 public virtual void Pause()
 {
     if (CurrentStatus == AnimatorStatus.OnHold || CurrentStatus == AnimatorStatus.Playing)
     {
         HorizontalAnimator.Pause();
         VerticalAnimator.Pause();
     }
 }