Silverlight windows Phone项目中是否存在“DrawString”API,就像在Android / iOS中一样

时间:2013-12-23 10:05:14

标签: c# silverlight xna drawstring

在这里,试图混淆XNA apis但无法帮助!

我的代码:

SpriteFont spriteBatch = new SpriteBatch(GraphicsDevice);
spritefont1 = Microsoft.Xna.Framework.Content.Load<SpriteFont>("SpriteFont1");
floor = Microsoft.Xna.Framework.Content.Load<Texture2D>("floor");
GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.CornflowerBlue);
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.NonPremultiplied);
spriteBatch.Draw(floor, new Vector2(), Microsoft.Xna.Framework.Color.White);
spriteBatch.DrawString(spritefont1, "hello", new Vector2(80, 10), Microsoft.Xna.Framework.Color.Green);
spriteBatch.End();

在第1,2,3行获取错误。它无法找到“加载”,任何建议或替代方案? PS:Silverlight windows Phone项目中是否有像Andriod一样的iOS,它有'.drawString(“”)'来绘制任何字符串......

谢谢!

0 个答案:

没有答案