Files
Click-PointRPG/Assets/Scripts/Interfaces/IInteractiveObject.cs

29 lines
779 B
C#
Raw Permalink Normal View History

2026-02-11 17:30:49 +00:00
using UnityEngine;
/// <summary>
/// Interface for interactive objects that the player can interact with.
/// Implement this for gates, bridges, ledges, doors, levers, etc.
/// </summary>
public interface IInteractiveObject
{
/// <summary>
/// Get the world position where the player should move to for this interaction
/// </summary>
Vector3 GetInteractionPoint();
/// <summary>
/// Check if this object can currently be interacted with
/// </summary>
bool CanInteract();
/// <summary>
/// Perform the interaction. player is the GameObject of the player
/// </summary>
void Interact(GameObject player);
/// <summary>
/// Get a display name for this interactive object
/// </summary>
string GetDisplayName();
}