If I have lets say, an "A" button and a "B" button much like a NES controller.
And if the user presses button A, I want it to shoot, and if he presses button B, I want it to jump..
Is the MenuItemButton the way to do this ?
A fast, easy to use, free, and community supported 2D game engine
If I have lets say, an "A" button and a "B" button much like a NES controller.
And if the user presses button A, I want it to shoot, and if he presses button B, I want it to jump..
Is the MenuItemButton the way to do this ?
Never heard of MenuItemButton . You can use MenuItemImage, but then you have to keep track of it "being held down" somehow since Menus weren't originally intended for that purpose. There is also the new Targeted Touch Delegate in the latest version. You could use that to target touches to your sprites and go from there.
You could definitely subclass MenuItemSprite or MenuItemImage for this purpose. You can override the selected and unselected methods of those items to toggle a BOOL property and/or start a timer (for rapid fire).
You must log in to post.