29 lines
779 B
C#
29 lines
779 B
C#
|
|
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();
|
||
|
|
}
|