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"); }
private void SetupTool() { _tool = ToolHelper.AddTool <JunctionTool>(); _tool.Disabled += OnToolDisabled; }