Trigger

class Trigger(trigger: () -> Float, threshold: Float = 0.0f) : Control

A trigger control that has a value between 0 and 1.

Parameters

trigger

the value of the trigger to watch

threshold

the amount the trigger has to be pressed before it is considered 'pressed'

Constructors

Link copied to clipboard
constructor(trigger: () -> Float, threshold: Float = 0.0f)

Properties

Link copied to clipboard

Whether the current boolean state just changed to false.

Link copied to clipboard

This command will be scheduled every update that the trigger is held down.

Link copied to clipboard

This command will be scheduled every time the trigger is pressed.

Link copied to clipboard

Current profile curve (defaults to linear)

Link copied to clipboard

This command will be scheduled every time the trigger is released.

Link copied to clipboard

Whether the current boolean state just changed to true.

Link copied to clipboard

The current boolean state of this control.

Link copied to clipboard

This command will be scheduled whenever the state changes.

Link copied to clipboard

Whether the current boolean state just changed.

Link copied to clipboard

The amount the trigger is being pressed.

Functions

Link copied to clipboard
open override fun update()

Updates the current state and the rising, falling, and changed states. Further, schedules commands accordingly.