Activator - CodingDino/Dino-Unity-Toolkit GitHub Wiki

An Activator is a type of component from the Dino Unity Toolkit. Activators don't actually do anything themselves - rather, they tell Action components when those components should perform their functionality.

For example, you might want to make your character jump when a button is pressed. To do that, you would attach an InputButtonActivator component, which tells an Action to happen when a button is pressed. However, by itself this won't actually do anything - you need to tell it what Action to perform! To do that, you need to attach an Action such as the ApplyForce2DAction to your character, and hook this component up to your InputButtonActivator. Now, when a button is pressed, the InputButtonActivator will tell the ApplyForceAction to perform its function.

Image: ApplyForce2DAction attached to a player.

Image: InputButtonActivator set to listen for the "Jump" button, and hooked up to the Player and the ApplyForce2DAction.

Image: InputButtonActivator senses the button press and tells ApplyForce2DAction to push the player up into the air.

By combining Actions and Activators, you can make almost anything happen in your game!