A bit wonky but working switching
This commit is contained in:
38
Assets/Scripts/Input/IInteractingCharacter.cs
Normal file
38
Assets/Scripts/Input/IInteractingCharacter.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
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; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user