Big script cleanup. Remove the examples from Ropes' external package
This commit is contained in:
19
Assets/Scripts/Interactions/InteractionRequirementBase.cs
Normal file
19
Assets/Scripts/Interactions/InteractionRequirementBase.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user