我最近将一个 WP7 XNA 应用程序迁移到 MonoGame。当我构建时,我收到一条错误消息,说没有图形设备管理器。这是代码:
MonoGame.Framework.MacOS > Game.cs
private GraphicsDeviceManager graphicsDeviceManager
{
get
{
if (_graphicsDeviceManager == null)
{
_graphicsDeviceManager = (IGraphicsDeviceManager)
Services.GetService(typeof(IGraphicsDeviceManager));
if (_graphicsDeviceManager == null)
throw new InvalidOperationException ("No Graphics Device Manager");
}
return (GraphicsDeviceManager)_graphicsDeviceManager;
}
}
看来我的游戏课永远不会开始。我为游戏创建了一个 MacOS 项目。我用错了吗?我正在按照以下步骤制作 iPad / iPhone 游戏:http ://www.facepuncher.com/blogs/10parameters/?p=42