protected override void OnDisabled() { base.OnDisabled(); VesselsToRemove = new ConcurrentQueue <Guid>(); RemovedVessels.Clear(); GameEvents.onVesselRecovered.Remove(VesselRemoveEvents.OnVesselRecovered); GameEvents.onVesselTerminated.Remove(VesselRemoveEvents.OnVesselTerminated); GameEvents.onVesselWillDestroy.Remove(VesselRemoveEvents.OnVesselWillDestroy); GameEvents.onGameStatePostLoad.Remove(VesselRemoveEvents.OnGameStatePostLoad); }
/// <summary> /// Clears the dictionary, you should call this method when switching scene /// </summary> public void ClearSystem() { VesselsToRemove = new ConcurrentQueue <VesselRemoveEntry>(); RemovedVessels.Clear(); }
/// <summary> /// Clears the dictionary, you should call this method when switching scene /// </summary> public void ClearSystem() { RemovedVessels.Clear(); }