ControllerInput class

Handles game controller/gamepad input

Constructors

ControllerInput()

Properties

deadZone double
Dead zone for analog sticks
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
leftStick Offset
Get left stick as vector
no setter
rightStick Offset
Get right stick as vector
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clear all controller state
dispose() → void
Dispose controller resources
getAxis(String axis) double
Get controller axis value (-1 to 1)
initialize() → void
Initialize controller input
isButtonDown(int button) bool
Check if controller button is currently held down
isButtonPressed(int button) bool
Check if controller button was pressed this frame
isButtonReleased(int button) bool
Check if controller button was released this frame
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAxis(String axis, double value) → void
Set axis value (for testing or external input)
setButton(int button, bool pressed) → void
Set button state (for testing or external input)
toString() String
A string representation of this object.
inherited
update() → void
Update controller state each frame

Operators

operator ==(Object other) bool
The equality operator.
inherited