Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - bmyu1

Pages: [1]
1
Support / tk2dSpriteAnimator.PlayFrom and AnimationCompleted Event
« on: March 23, 2017, 09:33:56 am »
tk2dSpriteAnimator.PlayFrom(larger time than animation time) should fire AnimationCompleted Event immediately, but the event never happen.


tk2dSpriteAnimator.cs
               // clipStartTime is in seconds
               // clipTime is in clip local time (ignoring fps)
               float time = clipStartTime * clipFps;
               if (currentClip.wrapMode == tk2dSpriteAnimationClip.WrapMode.Once && time >= clipFps * currentClip.frames.Length)
               {
                  // warp to last frame
                  WarpClipToLocalTime(currentClip, currentClip.frames.Length - 1);
                        OnAnimationCompleted(); <<<< This line should be added.
                        state &= ~State.Playing;
               }

Pages: [1]