openfl / dragonbones

Runtime support for DragonBones skeletal animation
http://www.dragonbones.com
Other
41 stars 14 forks source link

FrameEvent sometimes not dispatched issue/fix ? #6

Closed MatseFR closed 4 years ago

MatseFR commented 6 years ago

Hi, My game uses dragonbones a lot, and relies on FrameEvents for many things. I had to slightly modify this line : https://github.com/openfl/dragonbones/blob/118e5e22ebc461a329277cf8064bb2a35169444e/dragonBones/animation/AnimationTimelineState.hx#L130

just replacing <= with <

Otherwise in some cases the frameEvent would never be dispatched, especially at low framerate. With this change it works 100% even at 1fps I'm not sure it's a "real" issue because when we started our game dragonbones didn't have the tool they have now, so all our dragonbones come from flash. Maybe it's different when you export from their tool.

Still in my case it's definetely a real issue and just doing that small change fixes it entirely

MatseFR commented 4 years ago

I should have closed that long ago :)