protected override void OnShutdown() { if (m_scriptController != null) { m_scriptController.Dispose(); m_scriptController = null; } Game.Screen.Elements.Remove(m_placementPreview); m_placementPreview.Dispose(); m_placementPreview = null; Game.Screen.Elements.Remove(m_placementPreviewText); m_placementPreviewText.Dispose(); m_placementPreviewText = null; Game.Screen.Elements.Remove(m_titleText); m_titleText.Dispose(); m_titleText = null; if (m_dialog != null) { Game.Screen.Elements.Remove(m_dialog); if (m_disposeDialogOnClose) { m_dialog.Dispose(); } m_dialog = null; } }