20 lines
701 B
C#
20 lines
701 B
C#
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
|
|
/// <summary>
|
|
/// Abstract base class for interaction requirements. Defines success/failure events and the TryInteract contract.
|
|
/// </summary>
|
|
public abstract class InteractionRequirementBase : MonoBehaviour
|
|
{
|
|
[Header("Events")]
|
|
public UnityEvent OnSuccess;
|
|
public UnityEvent OnFailure;
|
|
|
|
/// <summary>
|
|
/// Attempts to perform the interaction requirement with the given follower.
|
|
/// </summary>
|
|
/// <param name="follower">The follower attempting the interaction.</param>
|
|
/// <returns>True if the interaction was successful, false otherwise.</returns>
|
|
public abstract bool TryInteract(FollowerController follower);
|
|
}
|