ControllerStick

class ControllerStick(function: () -> Float) : Triggerables.AnalogTriggerable

Stick class to manage callbacks and states

Constructors

Link copied to clipboard
fun ControllerStick(function: () -> Float)

Functions

Link copied to clipboard
open override fun update()

Updates the stick state

Properties

Link copied to clipboard
open override var activationThreshold: Double = 0.3

The threshold for stick activation

Link copied to clipboard
var active: Boolean = false

Whether or not the triggerable is currently active

Link copied to clipboard
var correctedValue: Float = 0.0f

What the value of the stick is if it's corrected by the threshold

Link copied to clipboard
var onActivate: Triggerables.TriggerableCallback? = null

Callback for when the button is pressed

Link copied to clipboard
var onActivateNeg: Triggerables.TriggerableCallback? = null

Callback for when the stick is activated negatively

Link copied to clipboard
var onDeactivate: Triggerables.TriggerableCallback? = null

Callback for when the button is released

Link copied to clipboard
var onDeactivateNeg: Triggerables.TriggerableCallback? = null

Callback for when the stick is deactivated negatively

Link copied to clipboard
var onToggle: Triggerables.TriggerableCallback? = null
Link copied to clipboard
val rawValue: () -> Float

Get the value of the stick from the controller

Link copied to clipboard
var state: Triggerables.TriggerDirection

What direction the stick is currently active in

Link copied to clipboard
var whileActive: Triggerables.TriggerableCallback? = null

Callback for while the button is pressed

Link copied to clipboard
var whileActiveNeg: Triggerables.TriggerableCallback? = null

Callback for while the stick is active negatively

Link copied to clipboard
var whileInactive: Triggerables.TriggerableCallback? = null

Callback for while the triggerable is deactivated