找不到答案,希望各位大神帮忙,先谢谢了。这些被加载在文件的开头 -
SpriteBatch mBatch;
Texture2D mTheQuantumBros2;
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
mBatch = new SpriteBatch(this.graphics.GraphicsDevice);
//Create the Content Manager object to load images
ContentManager aLoader = new ContentManager(this.Services);
//Use the Content Manager to load the Cat Creature image into the Texture2D object
mTheQuantumBros2 = aLoader.Load<Texture2D>("TheQuantumBros2") as Texture2D;
// TODO: use this.Content to load your game content here
}
错误是说找不到文件。文件是TheQuantumBros2.png,我尝试在原始游戏区和内容区下加载。两者都不起作用,我将它们放在目录中并将它们也加载到 Visual Studio 上的游戏中。想法?