Set Keys allows you to assign which keys should be mapped to which virtual buttons.
 
Once you have made your selections, the Test Keys page will let you see some behind the scenes stuff of how it works.
 
To use the InputHelper in your own HaxeFlixel games just drop the InputHelper.hx into your HaxeFlixel project.  Call InputHelper.init() in your main class (not your main menu class!) and add any virtual buttons you want with InputHelper.addButton(buttonName).  
 
Keys can be assigned at any time by calling InputHelper.assignKeyToButton(Key, buttonName).
 
Every game loop, call InputHelper.updateKeys().  Once that is done, use InputHelper.isButtonPressed(buttonName) or one of the other functions in place of the FlxG.keys functions.  Done!
 
InputHelper can be downloaded here.
 

 

Add comment


Security code
Refresh