GearBlocks
The GearBlocks Lua scripting API
Public Member Functions | List of all members
SmashHammer.Input.InputActionsAsset Class Reference

The input actions. More...

Inheritance diagram for SmashHammer.Input.InputActionsAsset:
SmashHammer.Input.IInputActions SmashHammer.Input.IKeyBindings

Public Member Functions

bool IsTriggered (int actionID)
 Was an input action triggered?
 
bool IsHeld (int actionID)
 Is an input action held?
 
bool IsTriggered (int actionID)
 Was an input action triggered?
 
bool IsHeld (int actionID)
 Is an input action held?
 
string GetBinding (int actionID, bool getSecondary, bool shortNames)
 Get the key bound to an input action.
 

Detailed Description

The input actions.

Available in Lua via the "InputActions" global, for example:

local jumpTriggered = InputActions.IsTriggered( actionID_Jump )

Member Function Documentation

◆ IsTriggered()

bool SmashHammer.Input.InputActionsAsset.IsTriggered ( int  actionID)

Was an input action triggered?

Parameters
actionIDThe ID of the input action to check.
Returns
true if the input action was triggered this frame; otherwise, false.

Implements SmashHammer.Input.IInputActions.

◆ IsHeld()

bool SmashHammer.Input.InputActionsAsset.IsHeld ( int  actionID)

Is an input action held?

Parameters
actionIDThe ID of the input action to check.
Returns
true if the input action is currently held; otherwise, false.

Implements SmashHammer.Input.IInputActions.