-
Notifications
You must be signed in to change notification settings - Fork 2
Introduction
Carbon is a little pack of extensions for the LibGDX framework. Currently there is only one extension: CarbonController
The LibGDX-controller extension is quite useful, but it's not so easy to use, if you want to handle different controllers with different mappings. In my case i use a XBox 360 controller with my PC and an Ipega bluetooth controller with Android. The XBox controller uses the buttoncode 0 for the A-button, but the Ipega uses the code 96. A CarbonController (code) checks which kind of controller is used and remaps it, so you can always use the same mapping, independet of the real mapping. Additionally the mappings are represented by enumerations instead of ints. In the above example, you could get the state of the A-button by the following:
getButton(CarbonKey.A)For more information look at CarbonController