25 lines
804 B
C#
25 lines
804 B
C#
using Ashwild.Player;
|
|
|
|
namespace Ashwild.Interaction
|
|
{
|
|
/// <summary>
|
|
/// Implemented by anything the player can interact with via the interaction
|
|
/// raycast (pickups, doors, chests, levers, NPCs...). PlayerInteractor only
|
|
/// knows about this contract, never the concrete types.
|
|
/// </summary>
|
|
public interface IInteractable
|
|
{
|
|
/// <summary>
|
|
/// Short label describing the action, shown under the crosshair while the
|
|
/// player is aiming at this target (e.g. "Pick up Wood", "Open").
|
|
/// </summary>
|
|
string InteractionPrompt { get; }
|
|
|
|
/// <summary>
|
|
/// Performs the interaction. Called once when the player presses interact
|
|
/// while aiming at this target.
|
|
/// </summary>
|
|
void Interact();
|
|
}
|
|
}
|