Package com.prineside.luaj.mapping.parts
Class LJ_GDX.Controller_AN.LIP
java.lang.Object
com.prineside.luaj.mapping.InterfaceProxy
com.prineside.luaj.mapping.parts.LJ_GDX.Controller_AN.LIP
- All Implemented Interfaces:
com.badlogic.gdx.controllers.Controller,com.esotericsoftware.kryo.KryoSerializable
- Enclosing class:
- LJ_GDX.Controller_AN
public static class LJ_GDX.Controller_AN.LIP
extends InterfaceProxy
implements com.badlogic.gdx.controllers.Controller
-
Field Summary
Fields inherited from interface com.badlogic.gdx.controllers.Controller
PLAYER_IDX_UNSET -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(com.badlogic.gdx.controllers.ControllerListener p1) Adds a newControllerListenerto thisController.voidCancel any running vibration.booleanfloatgetAxis(int p1) intbooleangetButton(int p1) com.badlogic.gdx.controllers.ControllerMappingintintgetName()intcom.badlogic.gdx.controllers.ControllerPowerLevelbooleanbooleanvoidremoveListener(com.badlogic.gdx.controllers.ControllerListener p1) Removes the givenControllerListenervoidsetPlayerIndex(int p1) Sets the player index of this controller.voidstartVibration(int p1, float p2) Starts vibrating this controller, if possible.booleanMethods inherited from class com.prineside.luaj.mapping.InterfaceProxy
getLuaObj, read, write
-
Method Details
-
addListener
public void addListener(com.badlogic.gdx.controllers.ControllerListener p1) Description copied from interface:com.badlogic.gdx.controllers.ControllerAdds a newControllerListenerto thisController. The listener will receive calls in case the state of the controller changes. The listener will be invoked on the rendering thread.- Specified by:
addListenerin interfacecom.badlogic.gdx.controllers.Controller
-
canVibrate
public boolean canVibrate()- Specified by:
canVibratein interfacecom.badlogic.gdx.controllers.Controller- Returns:
- whether the connected controller or the current controller implementation can rumble. Note that this is no guarantee that the connected controller itself can vibrate.
-
cancelVibration
public void cancelVibration()Description copied from interface:com.badlogic.gdx.controllers.ControllerCancel any running vibration. May not be supported by implementations- Specified by:
cancelVibrationin interfacecom.badlogic.gdx.controllers.Controller
-
getAxis
public float getAxis(int p1) - Specified by:
getAxisin interfacecom.badlogic.gdx.controllers.Controller- Returns:
- the value of the axis, between -1 and 1
-
getAxisCount
public int getAxisCount()- Specified by:
getAxisCountin interfacecom.badlogic.gdx.controllers.Controller- Returns:
- number of axis of this controller. Axis indices start at 0, so the maximum axis index is one under this value.
-
getButton
public boolean getButton(int p1) - Specified by:
getButtonin interfacecom.badlogic.gdx.controllers.Controller- Returns:
- whether the button is pressed.
-
getMapping
public com.badlogic.gdx.controllers.ControllerMapping getMapping()- Specified by:
getMappingin interfacecom.badlogic.gdx.controllers.Controller- Returns:
- button and axis mapping for this controller (or platform). The connected controller might not support all features.
-
getMaxButtonIndex
public int getMaxButtonIndex()- Specified by:
getMaxButtonIndexin interfacecom.badlogic.gdx.controllers.Controller- Returns:
- the maximum button index code that can be queried
-
getMinButtonIndex
public int getMinButtonIndex()- Specified by:
getMinButtonIndexin interfacecom.badlogic.gdx.controllers.Controller- Returns:
- the minimum button index code that can be queried
-
getName
- Specified by:
getNamein interfacecom.badlogic.gdx.controllers.Controller- Returns:
- the device name
-
getPlayerIndex
public int getPlayerIndex()- Specified by:
getPlayerIndexin interfacecom.badlogic.gdx.controllers.Controller- Returns:
- 0-based player index of this controller, or PLAYER_IDX_UNSET if none is set
-
getPowerLevel
public com.badlogic.gdx.controllers.ControllerPowerLevel getPowerLevel()- Specified by:
getPowerLevelin interfacecom.badlogic.gdx.controllers.Controller- Returns:
- value of enum
ControllerPowerLevelindicating battery state of the connected controller, orControllerPowerLevel.POWER_UNKNOWNif information is not present
-
getUniqueId
- Specified by:
getUniqueIdin interfacecom.badlogic.gdx.controllers.Controller- Returns:
- unique ID to recognize this controller if more than one of the same controller models are connected. Use this to map a controller to a player, but do not use it to save a button mapping.
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfacecom.badlogic.gdx.controllers.Controller- Returns:
- true when this Controller is still connected, false if it already disconnected
-
isVibrating
public boolean isVibrating()- Specified by:
isVibratingin interfacecom.badlogic.gdx.controllers.Controller- Returns:
- if the controller is currently rumbling
-
removeListener
public void removeListener(com.badlogic.gdx.controllers.ControllerListener p1) Description copied from interface:com.badlogic.gdx.controllers.ControllerRemoves the givenControllerListener- Specified by:
removeListenerin interfacecom.badlogic.gdx.controllers.Controller
-
setPlayerIndex
public void setPlayerIndex(int p1) Description copied from interface:com.badlogic.gdx.controllers.ControllerSets the player index of this controller. Please note that this does not always set indication lights of controllers, it is just an internal representation on some platforms- Specified by:
setPlayerIndexin interfacecom.badlogic.gdx.controllers.Controller- Parameters:
p1- 0 typically 0 to 3 for player indices, and PLAYER_IDX_UNSET for unset
-
startVibration
public void startVibration(int p1, float p2) Description copied from interface:com.badlogic.gdx.controllers.ControllerStarts vibrating this controller, if possible.- Specified by:
startVibrationin interfacecom.badlogic.gdx.controllers.Controller- Parameters:
p1- duration, in millisecondsp2- value between 0f and 1f
-
supportsPlayerIndex
public boolean supportsPlayerIndex()- Specified by:
supportsPlayerIndexin interfacecom.badlogic.gdx.controllers.Controller- Returns:
- whether the connected controller (or the implementation) can return and set the current player index
-