Skip to content

Centralize all input handling in FlxG.input #199

Open
@Dovyski

Description

@Dovyski

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")) {
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions