HaxeFlixel / flixel

Free, cross-platform 2D game engine powered by Haxe and OpenFL
https://haxeflixel.com/
MIT License
1.97k stars 434 forks source link

pause FlxFlicker #3082

Closed Geokureli closed 1 month ago

Geokureli commented 6 months ago

Add pause and resume to FlxFlicker, I saw it in the Funkin branch

EliteMasterEric commented 6 months ago

For context with regards to the double release bug, I encountered that when I wanted to make a slower flicker, followed by a faster flicker, then stop flickering.

However, calling FlxFlicker in the onComplete callback would destroy any existing flickers on the object, then recycle that destroyed flicker, but the recycled flicker was the one currently calling onComplete so it would immediately call release on the flicker that was supposed to be active.

Geokureli commented 6 months ago

Note: I added FlxTween.flicker, in https://github.com/HaxeFlixel/flixel/pull/3086, which offsers pausing and resuming but I may still add them to FlxFlicker