我尝试使用 Cocos2D XNA + Monogame 在 Windows Phone 8 (VS 2013) 上开发 HelloWorld 游戏。我安装 Monogame,创建一个项目,通过 Nuget 在 Cocos2d XNA 上添加引用。
然后我从文档https://cocos2dxna.codeplex.com复制示例
using System;
using Cocos2D;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace GameName3
{
/// <summary>
/// This is the main type for your game
/// </summary>
public class Game1 : Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
#if !WINDOWS && !MACOS
this.graphics.IsFullScreen = true;
#else
this.graphics.IsFullScreen = false;
#endif
this.graphics.PreferMultiSampling = true;
// Frame rate is 30 fps by default for Windows Phone.
TargetElapsedTime = TimeSpan.FromTicks(333333);
IsFixedTimeStep = true;
#if WINDOWS || MACOS
this.IsMouseVisible = true;
#endif
CCApplication application = new AppDelegate(this, graphics);
this.Components.Add(application);
CCDirector.SharedDirector.GamePadEnabled = true;
application.GamePadButtonUpdate += new CCGamePadButtonDelegate(application_GamePadButtonUpdate);
}
在 CCApplication 上,我有:模块 'Microsoft.XNA.Framework.Game, Version=4.0.0.0, Token=...' 应该被引用。
但是在 MonoGame 中我没有找到这样的路径......我还安装了这个https://msxna.codeplex.com/releases/view/117230 我做错了什么?