28 lines
754 B
C#
28 lines
754 B
C#
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// Any object in the game that the player can interact with MUST implement this interface!
|
|
/// </summary>
|
|
public interface IInteractable
|
|
{
|
|
/// <summary>
|
|
/// The primary text that shows up in the UI (e.g. "Collect", "Open")
|
|
/// </summary>
|
|
string GetInteractText();
|
|
|
|
/// <summary>
|
|
/// The secondary text that shows up in the UI (e.g. "Apple", "Wooden Door")
|
|
/// </summary>
|
|
string GetSecondaryInteractText();
|
|
|
|
/// <summary>
|
|
/// Can the player currently interact with this? (E.g. false if a chest is already open)
|
|
/// </summary>
|
|
bool CanInteract();
|
|
|
|
/// <summary>
|
|
/// What happens when the player presses E!
|
|
/// </summary>
|
|
void Interact(GameObject player);
|
|
}
|