MassiveHeights / Black

World's fastest HTML5 2D game engine   🛸
http://blacksmith2d.io
Other
206 stars 24 forks source link

AnimationController.remove doesn't remove animations #78

Open Dunnings opened 2 years ago

Dunnings commented 2 years ago

The remove function in the AnimationController class doesn't actually remove the animation from this.mAnimations unless it is currently playing.

https://github.com/MassiveHeights/Black/blob/3b31e2a4568abefae7e8cb2e36b9dcf65b195491/src/animation/AnimationController.js#L51

How to fix:

Swap line 59 https://github.com/MassiveHeights/Black/blob/3b31e2a4568abefae7e8cb2e36b9dcf65b195491/src/animation/AnimationController.js#L59 and line 62 https://github.com/MassiveHeights/Black/blob/3b31e2a4568abefae7e8cb2e36b9dcf65b195491/src/animation/AnimationController.js#L62

62316e commented 1 month ago

Please open PR