started building out level

Signed-off-by: sdqhome\caleb <caleb@sdqhome.co.uk>
This commit is contained in:
2026-08-05 08:18:15 +01:00
parent f53c8256df
commit 7b8d500f75
6372 changed files with 6314829 additions and 20587 deletions

View File

@@ -0,0 +1,33 @@
using UnityEngine;
using Quests;
namespace Quests
{
public class QuestInteractableObjective : Interactable
{
[Header("Quest Objective Settings")]
[Tooltip("The Target ID matching the Quest Objective's targetID for ObjectiveType.Interact")]
[SerializeField] private string interactableObjectiveID;
[Tooltip("If true, reports to QuestManager upon interaction.")]
[SerializeField] private bool reportOnInteract = true;
[Tooltip("If true, disables interaction after triggering once.")]
[SerializeField] private bool singleUse = false;
private bool hasBeenInteracted = false;
public override void Interact(GameObject interactor)
{
if (hasBeenInteracted && singleUse) return;
base.Interact(interactor);
if (reportOnInteract && QuestManager.Instance != null)
{
QuestManager.Instance.ReportInteract(interactableObjectiveID);
hasBeenInteracted = true;
}
}
}
}