public class MappedController
extends java.lang.Object
MappedController mappedController = new MappedController(controller, controllerMappings); mappedController.isButtonPressed(BUTTON_JUMP); mappedController.getAxisValue(AXIS_HORIZONTAL);Created by Benjamin Schulte on 05.11.2017.
| Constructor and Description |
|---|
MappedController(com.badlogic.gdx.controllers.Controller controller,
ControllerMappings mappings) |
| Modifier and Type | Method and Description |
|---|---|
float |
getConfiguredAxisValue(int configuredId)
returns current value of virtual axis
It is not checked if your configuredId is an axis.
|
java.lang.String |
getControllerName() |
boolean |
isButtonPressed(int configuredId)
returns whether a mapped button is pressed
It is not checked if your configuredId is a button.
|
void |
refreshMappingCache()
refreshes the cached mapping from the ControllerMappings.
|
public MappedController(com.badlogic.gdx.controllers.Controller controller,
ControllerMappings mappings)
public void refreshMappingCache()
public boolean isButtonPressed(int configuredId)
It is not checked if your configuredId is a button.
configuredId - public float getConfiguredAxisValue(int configuredId)
It is not checked if your configuredId is an axis.
configuredId - public java.lang.String getControllerName()