# Utilities

***

## EasingUtility

A collection of easing functions for smooth animations.

```csharp
using FlowOfAction.Utilities;

// Available ease types
public enum EaseType
{
    Linear,
    EaseIn, EaseOut, EaseInOut,
    EaseInQuad, EaseOutQuad, EaseInOutQuad,
    EaseInCubic, EaseOutCubic, EaseInOutCubic,
    EaseInBack, EaseOutBack, EaseInOutBack,
    Bounce
}

// Usage
float t = 0.5f; // Progress (0-1)
float easedValue = EasingUtility.Evaluate(t, EaseType.EaseOutCubic);
```

***

## ActionOrPlayer

A helper class for actions that can target either an Action or a FlowPlayer.

```csharp
[SerializeField] private ActionOrPlayer _target;

// In DoAction():
if (_target.UseAction)
{
    yield return _target.Action.Execute();
}
else
{
    _target.Player.Play();
}
```

***

## IPoolable Interface

Interface for objects that can be pooled with the `PoolObject` action.

```csharp
public interface IPoolable
{
    void OnReturnToPool();
    void OnGetFromPool();
}

// Example implementation
public class PoolableEnemy : MonoBehaviour, IPoolable
{
    public void OnReturnToPool()
    {
        health = maxHealth;   // reset state when returned
    }

    public void OnGetFromPool()
    {
        gameObject.SetActive(true);
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://beelabs-dev.gitbook.io/beelabs-docs/flow-of-action/utilities.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
