/// <summary> /// 调用XNA资源卸载函数(禁止重载) /// </summary> public void OnNavigatedFrom(NavigationEventArgs e) { if (process != null) { process.End(); process.OnDestroy(); } if (useXNAListener) { sl_listener.UnloadContent(GamePage); } XNA_UnloadContent(); TargetElapsedTime.Stop(); try { SharedGraphicsDeviceManager.Current.GraphicsDevice.SetSharingMode(false); this.Destory(); } catch { } if (process != null) { process = null; } }
public void GameDestory() { log.I("LGame 2D Engine Shutdown"); try { isClose = true; if (process != null) { process.OnDestroy(); } if (content != null) { content.Unload(); content = null; } XNAConfig.Dispose(); Exit(); } catch { } }