InputButtonActivator - CodingDino/Dino-Unity-Toolkit GitHub Wiki

The InputButtonActivator component triggers an action whenever a specified button is pressed. Input buttons can be keyboard buttons, mouse buttons, or gamepad buttons, and are used to control things like jumping or attacking - anything that has a simply on/off value. They can be set up in Unity's InputManager.

This is an Activator component, and does nothing on its own, instead triggering a linked Action component. Actions, Activators, and Data make up the core system for the Dino Unity Toolkit.

Image: An InputButtonActivator set up to print some text to the console.

Properties

Conditions

These are the conditions which must be met in order for the actions to be triggered.

Property: Description:
Button The button the player must press to activate these actions. Button must be set up in Unity's InputManager and must match the name EXACTLY.
Cooldown How frequently can this activation happen, in seconds? Use 0 for no limit.

Actions

These are the lists of actions that will be activated when the above conditions are met

Property: Description:
On Button Pressed () Activates when button is first pressed down.
On Button Held () Activates every frame the button is held down.
On Button Released () Activates when the button is released.