> For the complete documentation index, see [llms.txt](https://infinitypbr.gitbook.io/magic-pig-games/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitypbr.gitbook.io/magic-pig-games/juicy-actions/quick-start-and-demos/key-concepts.md).

# Key Concepts

This page provides a brief overview of the key concepts in <mark style="color:yellow;">Juicy Actions</mark>. Please see the more in-depth docs for more in-depth details.

## Actions

Actions are classes which derive from `Action.cs` and are brought into your project as a <mark style="color:$primary;">Scriptable Object</mark>.&#x20;

Each action generally does one thing, or a very small number of things. They can do game logic, UI, game feel / juice, and much more.

{% content-ref url="/pages/wIby5D9DYE3gL9ySBCaN" %}
[Actions](/magic-pig-games/juicy-actions/actions.md)
{% endcontent-ref %}

#### Writing New Actions

The `Action.cs` class has a large amount of comments intended to help humans an AIs create new actions. While there are **hundreds** of actions shipped with <mark style="color:yellow;">Juicy Actions</mark>, devs can create custom actions to accomplish unique tasks, or to better integrate with their own systems and classes.

Inheriting from `InstantAction.cs`, `ActionOverTime.cs`, or `ActionOverTimeWithBaseValues.cs` lets you focus on the actual thing your action does with a complete runtime structure and standardized UX already in place.

{% content-ref url="/pages/ySqbLWmnlEhWpyzoEYEI" %}
[Write Custom Actions](/magic-pig-games/juicy-actions/actions/write-custom-actions.md)
{% endcontent-ref %}

## Action Executor

The `ActionExecutor` class holds a collection of actions — individual actions and "Groups" of <mark style="color:yellow;">Actions</mark>. This is the class responsible for executing actions at runtime.

To utilize this, add a `public ActionExecutor myActions;` to your class. The <mark style="color:yellow;">Action Executor</mark> will be displayed in the Inspector.

#### "Action On Event" Components

There are additional components that can be added to your objects which have <mark style="color:yellow;">Action Executors</mark> already attached. `ActionRunner`, `ActionOnTap`, `ActionOnTrigger`, and more.

Add these to your objects, and you can make use of them quickly.

Start execution on an <mark style="color:yellow;">Action Executor</mark> by calling `myActions.Execute(this);`

{% content-ref url="/pages/JGtmV5brTtkAPIKp0J5j" %}
[Action Executor](/magic-pig-games/juicy-actions/action-executor/action-executor.md)
{% endcontent-ref %}

## Blackboard

<mark style="color:yellow;">Juicy Actions</mark> ships with a `Blackboard` class. There is a global <mark style="color:yellow;">Action Blackboard</mark> object which will be automatically brought into your scenes. Each `ActionExecutor` also has its own `Blackboard`, which can be used by `Action` objects at runtime.<br>

The <mark style="color:yellow;">Blackboard</mark> is useful for storing information and allowing other objects to look up that data, or be notified of changes.

{% content-ref url="/pages/PhLn8kGwu2wiuy2iLu1q" %}
[Action Blackboard](/magic-pig-games/juicy-actions/action-blackboard.md)
{% endcontent-ref %}

## Juicy Actions Clock

<mark style="color:yellow;">Juicy Actions</mark> also ships with a clock. This enables actions to utilize a `Timescale` that is separate from the Unity Timescale, but also adheres to changes to the Unity Timescale. If you'd like objects to be able to pause through actions, often to freeze time for a moment, you may wish to ensure they utilize the <mark style="color:yellow;">Juicy Actions Clock</mark>.

You can easily connect this clock with [**Magic Time - Local Time Scales**](/magic-pig-games/juicy-actions/integrations/magic-time-local-time-scale.md) or other 3rd party clocks, or your own.

{% content-ref url="/pages/PPuwZJmwbRlJMW9aPjms" %}
[Clock & Time Scales](/magic-pig-games/juicy-actions/clock-and-time-scales.md)
{% endcontent-ref %}
