private void SetupTrafficRoutesInfoView() { _junctionSettings = TrafficRoutesInfoViewPanel.instance.Find <UIPanel>("JunctionSettings"); _junctionSettings.eventVisibilityChanged += OnJunctionSettingsVisibilityChanged; _junctionSettingsBehaviour = new JunctionSettingsBehaviour(GameOptions); }
private void Destroy() { _junctionSettingsBehaviour.Dispose(); _junctionSettingsBehaviour = null; _junctionSettings.eventVisibilityChanged -= OnJunctionSettingsVisibilityChanged; _junctionSettings = null; ToggleTrafficLightsButton.DestroyAll(); _tool.Disabled -= OnToolDisabled; ToolHelper.RemoveTool(_tool); _tool = null; Options = null; ForgetPreviousTool(); DestroyDebug(); DebugLog.Info("Level destroyed"); }