For a game I’m making, I want to implement a mechanic so someone can click on a sprite and edit certain pieces of info. If you have ever played any of the Bloons TD games, it’s like that, where you click on the sprite and you get a menu at the bottom, where you can edit information about it, such as buying upgrades or “selling” the sprite.
How can one accomplish this? I’m using FlashDevelop and Flixel right now. I believe FlxExtendedSprites are clickable, but here are some questions I have about how to make the clicky part work properly:
-How can I initiate a menu thing at the bottom of the screen when clicking the sprite (should I just “playstate.add(menuthingy)” it in?)
-How can I make the menu disappear when the mouse clicks somewhere else? (should I just “playstate.remove(menuthingy)” it?)
-How can I make it so I can only change the angle of the sprite that is currently selected? (The sprites I want to select are lasers and mirrors, and I want to make it so I can edit only one of their angles at a time so that every single one isn’t being edited at once).
-I have FlxGroups for my lasers and mirrors, should I combine them into one big FlxGroup to make the editing of one sprite at a time easier?
Thanks very much for your help!