Files
AppleHillsProduction/Assets/Scripts/Pooling/IPoolableWithReference.cs

19 lines
606 B
C#

using UnityEngine;
namespace Pooling
{
/// <summary>
/// Interface for poolable objects that need to reference their parent pool.
/// Implement this interface on objects that need to return themselves to their pool.
/// </summary>
/// <typeparam name="T">The type of pool component</typeparam>
public interface IPoolableWithReference<T> : IPoolable where T : Component
{
/// <summary>
/// Sets the parent pool for this object
/// </summary>
/// <param name="pool">The pool this object belongs to</param>
void SetPool(T pool);
}
}