39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using UnityEngine;
|
|
|
|
namespace Input
|
|
{
|
|
/// <summary>
|
|
/// Interface for characters that can participate in scripted interactions.
|
|
/// Provides movement-to-target with arrival/cancellation notifications.
|
|
/// Implemented by BasePlayerMovementController to enable all controllers to interact with items.
|
|
/// </summary>
|
|
public interface IInteractingCharacter
|
|
{
|
|
/// <summary>
|
|
/// Moves character to target position and notifies when arrived/cancelled
|
|
/// </summary>
|
|
void MoveToAndNotify(Vector3 target);
|
|
|
|
/// <summary>
|
|
/// Interrupts any in-progress MoveToAndNotify operation
|
|
/// </summary>
|
|
void InterruptMoveTo();
|
|
|
|
/// <summary>
|
|
/// Fired when character arrives at MoveToAndNotify target
|
|
/// </summary>
|
|
event System.Action OnArrivedAtTarget;
|
|
|
|
/// <summary>
|
|
/// Fired when MoveToAndNotify is cancelled/interrupted
|
|
/// </summary>
|
|
event System.Action OnMoveToCancelled;
|
|
|
|
/// <summary>
|
|
/// Character's transform (for position queries)
|
|
/// </summary>
|
|
Transform transform { get; }
|
|
}
|
|
}
|
|
|