Color legend method
An action driven by buttons, for jumping, firing or opening a menu.
A class, in the namespace BorrowedTorch.InputBinding.Types.Actions. It derives from BaseAction, and has its Name, Description and Representation. Only a ButtonInput can be bound to it. RegisterButtonAction makes and registers one in a call; this class is for actions built ahead, registered with RegisterAction. The actions page shows it in context, with code.
Names are colored by what they are: a method.
Methods
ButtonAction() →
ButtonAction(string name, Action<ButtonState, int> action) · An action that calls the callback with the ButtonState and the player number of each bound input passed to Update. Throws ArgumentNullException for a null name and ArgumentException for an empty one. Set Description and Representation in an initializer.
| Parameter | Type | Description |
|---|---|---|
name |
string |
The action’s name, unique in the binder it is registered in. |
action |
Action<ButtonState, int> |
The callback. May be null: the action then does nothing. |