Files
AppleHillsProduction/Assets/Scripts/Interactions/OneClickInteraction.cs

22 lines
627 B
C#
Raw Normal View History

2025-09-09 13:38:03 +02:00
using UnityEngine;
using Input;
using Interactions;
2025-09-09 13:38:03 +02:00
2025-10-31 13:50:08 +01:00
namespace Interactions
2025-09-09 13:38:03 +02:00
{
2025-10-31 13:50:08 +01:00
/// <summary>
/// Interactable that immediately completes when the character arrives at the interaction point.
/// Useful for simple trigger interactions that don't require additional logic.
/// </summary>
public class OneClickInteraction : InteractableBase
2025-09-09 13:38:03 +02:00
{
2025-10-31 13:50:08 +01:00
/// <summary>
/// Override: Immediately completes the interaction with success when character arrives.
/// </summary>
protected override void OnCharacterArrived()
2025-09-09 13:38:03 +02:00
{
2025-10-31 13:50:08 +01:00
CompleteInteraction(true);
2025-09-09 13:38:03 +02:00
}
}
}