Files
Emberwild/Assets/GAME/Script/Interaction/IInteractable.cs
Mathew 78bfdf2828 Merge remote-tracking branch 'origin/feat/inport-props' into feat/craft-discovery
# Conflicts:
#	Assets/External/Animated PBR Chest Demo/Materials/WoodChest.mat
#	Packages/com.distantlands.cozy.core/Content/Integration/Import for BiRP.unitypackage.meta
#	Packages/com.distantlands.cozy.core/Content/Integration/Import for HDRP.unitypackage.meta
#	Packages/com.distantlands.cozy.core/Content/Integration/Import for URP.unitypackage.meta
2026-07-25 19:42:26 +02:00

29 lines
1.1 KiB
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"). Returning
/// null or empty means "no interaction offered right now" — PlayerInteractor
/// skips such targets entirely (no hover, no Interact call), so a component may
/// implement IInteractable yet stay inert until it opts in (e.g. a Harvestable
/// that is only gatherable by hand when its bare-hand flag is set).
/// </summary>
string InteractionPrompt { get; }
/// <summary>
/// Performs the interaction. Called once when the player presses interact
/// while aiming at this target.
/// </summary>
void Interact();
}
}