working on quest and interaction system
This commit is contained in:
27
Assets/Scripts/IInteractable.cs
Normal file
27
Assets/Scripts/IInteractable.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user