[Puzzles][Input] Update input handling to not mistakingly miss frames. Add debug frame input debugging.
This commit is contained in:
@@ -10,20 +10,21 @@ public class ObjectiveStepBehaviour : MonoBehaviour
|
||||
void Awake()
|
||||
{
|
||||
interactable = GetComponent<Interactable>();
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (interactable == null)
|
||||
interactable = GetComponent<Interactable>();
|
||||
if (interactable != null)
|
||||
{
|
||||
interactable.Interacted += OnInteracted;
|
||||
}
|
||||
// Register with PuzzleManager
|
||||
PuzzleManager.Instance?.RegisterStepBehaviour(this);
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
void OnDisable()
|
||||
{
|
||||
if (interactable != null)
|
||||
{
|
||||
interactable.Interacted -= OnInteracted;
|
||||
}
|
||||
PuzzleManager.Instance?.UnregisterStepBehaviour(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user