Simple interactable rework
This commit is contained in:
@@ -8,7 +8,7 @@ namespace PuzzleS
|
||||
/// <summary>
|
||||
/// Manages the state and interactions for a single puzzle step, including unlock/lock logic and event handling.
|
||||
/// </summary>
|
||||
[RequireComponent(typeof(Interactable))]
|
||||
[RequireComponent(typeof(InteractableBase))]
|
||||
public class ObjectiveStepBehaviour : MonoBehaviour, IPuzzlePrompt
|
||||
{
|
||||
/// <summary>
|
||||
@@ -20,7 +20,7 @@ namespace PuzzleS
|
||||
[SerializeField] private GameObject puzzleIndicator;
|
||||
[SerializeField] private bool drawPromptRangeGizmo = true;
|
||||
|
||||
private Interactable _interactable;
|
||||
private InteractableBase _interactable;
|
||||
private bool _isUnlocked = false;
|
||||
private bool _isCompleted = false;
|
||||
private IPuzzlePrompt _indicator;
|
||||
@@ -33,7 +33,7 @@ namespace PuzzleS
|
||||
|
||||
void Awake()
|
||||
{
|
||||
_interactable = GetComponent<Interactable>();
|
||||
_interactable = GetComponent<InteractableBase>();
|
||||
|
||||
// Initialize the indicator if it exists, but ensure it's hidden initially
|
||||
if (puzzleIndicator != null)
|
||||
@@ -60,7 +60,7 @@ namespace PuzzleS
|
||||
void OnEnable()
|
||||
{
|
||||
if (_interactable == null)
|
||||
_interactable = GetComponent<Interactable>();
|
||||
_interactable = GetComponent<InteractableBase>();
|
||||
|
||||
if (_interactable != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user