Further updates to state machines
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user