/// <summary> /// Called when the object holding this component is disabled/destroyed. /// </summary> private void OnDisable() { //remove delegate event listeners: CustomEvents.BuildingPlaced -= OnBuildingPlaced; CustomEvents.BuildingHealthUpdated -= OnBuildingHealthUpdated; builderMonitor.Disable(); }
/// <summary> /// Called when the object holding this component is disabled/destroyed. /// </summary> void OnDisable() { //listen to delegate events: CustomEvents.NPCFactionInit -= OnNPCFactionInit; CustomEvents.BorderDeactivated -= OnBorderDeactivated; CustomEvents.BorderActivated -= OnBorderActivated; centerMonitor.Disable(); }
/// <summary> /// Called when the object holding this component is disabled/destroyed. /// </summary> private void OnDisable() { //custom event listeners: CustomEvents.MaxPopulationUpdated -= OnPopulationUpdated; CustomEvents.CurrentPopulationUpdated -= OnPopulationUpdated; CustomEvents.BuildingStartPlacement -= OnPendingPopulationEnter; CustomEvents.BuildingStopPlacement -= OnPendingPopulationExit; CustomEvents.BuildingBuilt -= OnPendingPopulationExit; populationBuildingsMonitor.Disable(); }