maze_switching (#82)

Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #82
This commit is contained in:
2025-12-15 09:20:15 +00:00
parent 34a6c367cc
commit c62f169d08
32 changed files with 2226 additions and 1155 deletions

View File

@@ -0,0 +1,47 @@
using System.Threading.Tasks;
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>
/// Controller-driven interaction movement. Each controller implements its own behavior
/// based on the interactable's settings (characterToInteract, CharacterMoveToTarget, etc.)
/// </summary>
/// <param name="interactable">The interactable to move to</param>
/// <returns>True if movement succeeded and character arrived, false if cancelled/failed</returns>
Task<bool> MoveToInteractableAsync(Interactions.InteractableBase interactable);
/// <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; }
}
}