It looks like my only issue was the FlxG.inWorldBounds() check after setting FlxG.worldBounds.set() to 0. After making my own worldBounds var and inWorldBounds() function I was able to replace the FlxG.worldBounds/inWorldBounds() with my own. Now I don't have double overlaps. Thank you!
So far, I haven't noticed any lag or frame rate drop.
I'll try this way for my workaround since I wont need any bool flags. I still would like to fix the button itself, but I don't know how.
EDIT: Checking and setting the button status isn't a good workaround. If you move off the button while holding down it misses the event on release or the next click. For now I'll use the bool flags. Thanks for trying, though.
Thanks. I don't necessarily want to use SubState for pause reasons, just wondering how others do it. Most example I've seen are simple and just switch MenuState/PlayState. The main menu is normally first to show, but I also want to be able to access it from the game, so I'm looking for the best way.
My PlayState creates the different levels from csv data files, so I only have one PlayState that just recreates each new level, or to restart a failed level. The score and some other vars are static so they carry over to the next level. My goal is to have a main menu with "New Game, Saved games, Options, Instructions, Quit", maybe "Resume Game" if one is in progress.
Maybe I'm not doing things the best way. I'm still on my first game with HF, learning as I go.
Thanks for your input @neal. For now I'm either going to prevent the double-fire with a boolean check, or break the code out of update() to a new function and run a timer at 30FPS. The boolean check will probably be more reliable. If anyone knows of a better way to handle this, please let me know.
Update: Definitely going with the boolean check. The timer may have worked on a simple example but not so good in the real world.
Thanks. I'll have a look at that, I'm not familiar with it. Right now I'm using one tilemap for the barriers and I have a multi-dimensional array of the tile indexes that I populated in my create() function. Then I have a loop to toggle them on/off. There's only a few tiles in each barrier.
Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.