private void DestroyAreas(int index) { if (_audioAreas[index] != null) { AreaLibrary.Untrack(_audioAreas[index]); _audioAreas[index].PlayerEnter -= EnterAudioClueArea; _audioAreas[index].PlayerLeave -= LeaveAudioClueArea; _audioAreas[index] = null; } if (_clueAreas[index] != null) { AreaLibrary.Untrack(_clueAreas[index]); _clueAreas[index].PlayerEnter -= EnterVisualClueArea; _clueAreas[index].PlayerLeave -= LeaveVisualClueArea; _clueAreas[index] = null; } if (_interactionAreas[index] != null) { AreaLibrary.Untrack(_interactionAreas[index]); _interactionAreas[index].PlayerEnter -= EnterInteractionArea; _interactionAreas[index].PlayerLeave -= LeaveInteractionArea; _interactionAreas[index] = null; } }
private void DestroyAreas() { if (_revealArea != null) { AreaLibrary.Untrack(_revealArea); _revealArea.PlayerEnter -= EnterRevealArea; _revealArea.PlayerLeave -= LeaveRevealArea; _revealArea = null; } if (_interactArea != null) { AreaLibrary.Untrack(_interactArea); _interactArea.PlayerLeave -= LeaveInteractionArea; _interactArea = null; } }