kaplay icon indicating copy to clipboard operation
kaplay copied to clipboard

bug: onEnd doesn't run when an object is set to loop

Open amyspark-ng opened this issue 1 year ago • 1 comments

Describe the bugA clear and concise description of what the bug is.

onAnimEnd/onEnd doesn't run for things that loop

VersionWhat version are you running?

v3000

To Reproduce Steps to reproduce the behavior:

  1. Add an object with an animation that is set to loop/Play a sound with loop: true
  2. Use onAnimEnd/onEnd
  3. onAnimEnd/onEnd doesn't run!!!!

Expected behaviorA clear and concise description of what you expected to happen.

Expecting it to run every time it loops, was thinking of an onLoop function but seems unnecesary since it only happens on loops, onEnd should just run every time that object loops

ScreenshotsIf applicable, add screenshots to help explain your problem.

amyspark-ng avatar May 27 '24 22:05 amyspark-ng

Since we may add a { loop: 5 } functionality later, it is best to have an onLoop event specifically for when an individual loop ends. onEnd should be reserved for an actual end. { loop: 5 } would have onLoop fired 4 times, then onEnd.

mflerackers avatar May 28 '24 00:05 mflerackers