Open
Description
When Flixel was created, developers usually focused on a single platform. That's not the case anymore: games are targeting different platforms, e.g. mobile, console, pc, web, etc.
In order to simplify the input handling process, the idea is to create FlxG.input
. It will be responsible for providing methods to read any type of input, e.g.:
FlxG.input.mouse.show();
if(FlxG.input.keys.any()) {
}
if(FlxG.input.fingers.any()) {
}
if(FlxG.input.fingers[0].x < 10 && FlxG.input.fingers[1].y > 50) {
}
if(FlxG.input.gamepad.justPressed("A")) {
}