Further updates to state machines

This commit is contained in:
Michal Pikulski
2025-11-05 13:48:25 +01:00
committed by Michal Pikulski
parent 199480447e
commit b3e0f90e09
26 changed files with 2211 additions and 4383 deletions

View File

@@ -87,15 +87,6 @@ namespace PuzzleS
}
}
void OnDisable()
{
if (_interactable != null)
{
_interactable.interactionStarted.RemoveListener(OnInteractionStarted);
_interactable.interactionComplete.RemoveListener(OnInteractionComplete);
}
}
protected override void OnDestroy()
{
base.OnDestroy();
@@ -104,6 +95,12 @@ namespace PuzzleS
{
PuzzleManager.Instance.UnregisterStepBehaviour(this);
}
if (_interactable != null)
{
_interactable.interactionStarted.RemoveListener(OnInteractionStarted);
_interactable.interactionComplete.RemoveListener(OnInteractionComplete);
}
}
/// <summary>