我正在使用monogame框架为windows store(桌面)开发游戏.其他一切工作都很出色,除了鼠标光标,它运行良好,但在玩游戏时没有显示.
protected override void Update(GameTime gameTime)
{
// TODO: Add your update logic here
TouchCollection touch = TouchPanel.GetState();
ms = Mouse.GetState();
if (ms.LeftButton == ButtonState.Pressed)
{
Debug.WriteLine("pressedddddd");
}
}
Run Code Online (Sandbox Code Playgroud)
你可以看到上面的代码...我在输出窗口"按下"得到ouptut但我无法看到屏幕上的光标我在Windows 8.1和visual studio 2013上使用monogame开发这个
我有19张图片,这是我的播放器的动画帧
在下面我创建了一个纹理数组作为青蛙,这是我的播放器.有19个图像.他们动画它们.
public class Texture {public static Texture2D mBackground; public static Texture2D mBackgroundOne; public static Texture2D mBackgroundTwo; public static Texture2D grassUp; public static Texture2D grassDown;
public static Texture2D [] frog = new Texture2D [19]; public static Texture2D [] frogdie = new Texture2D [4];
public static Vector2 position;
public static void Load()
{
mBackground = GamePage.contentManager.Load<Texture2D>("layer_11");
mBackgroundOne = GamePage.contentManager.Load<Texture2D>("layer_11");
mBackgroundTwo = GamePage.contentManager.Load<Texture2D>("layer_11");
grassUp = GamePage.contentManager.Load<Texture2D>("layer_11");
grassDown = GamePage.contentManager.Load<Texture2D>("layer_11");
frog[0] = GamePage.contentManager.Load<Texture2D>("player/maindak_normal1");
frog[1] = GamePage.contentManager.Load<Texture2D>("player/maindak_normal2");
frog[2] = GamePage.contentManager.Load<Texture2D>("player/maindak_normal3");
frog[3] = GamePage.contentManager.Load<Texture2D>("player/maindak_normal4");
frog[4] …Run Code Online (Sandbox Code Playgroud)