KMGamepad - Qkrisi/ktanemodkit GitHub Wiki

KMGamepad

[DisallowMultipleComponent]
public class KMGamepad : MonoBehaviour

Used to handle gamepad inputs.


public float GetAxisValue(AxisEnum axis, int controller = 0)

Gets the specified axis value.


public bool GetButtonDown(ButtonEnum button, int controller = 0)

Gets whether a specified button received a buttondown event this frame.


public bool GetButtonUp(ButtonEnum button, int controller = 0)

Gets whether a specified button received a buttonup event this frame.

Enumerations

public enum ButtonEnum

Enumeration of gamepad buttons using XBox gamepad naming conventions

Values: A, B, X, Y, LB, RB, START, LEFT, RIGHT, UP, DOWN


public enum AxisEnum

Enumeration of gamepad axes using XBox gamepad naming conventions

Values: LEFT_X, LEFT_Y, RIGHT_X, RIGHT_Y, LT, RT