I am new here,and I'm having problems with my project.
My project is a c# console game,mixed with xna game.
My problem with my project,is that I added a contents folder to it to load the xna sprites and etc,but everytime I make it run,it show,file not found on the texture loading.
I tried to see if the problem is the path,but isn't.It seens to not be recognizing the contents folder,or in other words,it threats as it does not exists,on my thoughts.
I tried to search on google,but it kept giving me weird results,
and I searched on this site for the solution,and none of them is what I wan't.
How can I make it recognize my contents folder,to be able to load sprites and other things on it?
public class Game : Microsoft.Xna.Framework.Game
{
public GraphicsDeviceManager graphics;
public SpriteBatch spriteBatch;
public Game()
{
graphics = new GraphicsDeviceManager(this);
graphics.PreferredBackBufferWidth = 640;
graphics.PreferredBackBufferHeight = 480;
graphics.IsFullScreen = false;
Content.RootDirectory = "Content";
}
protected override void Initialize()
{
base.Initialize();
}
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
Program.TestPlayer = Content.Load<Texture2D>("characters/blue"); //Here is where gives the error
Program.Tiles = Content.Load<Texture2D>("tiles"); //this gives error if the above script is commented.
}
protected override void UnloadContent()
{
}
protected override void Update(GameTime gameTime)
{
switch (Procedures.gmode)
{
case GameMode.ExplorationMode:
Exploration.ExplorationMode();
break;
default:
this.EndRun();
return;
}
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.White);
spriteBatch.Begin();
switch (Procedures.gmode)
{
case GameMode.ExplorationMode:
Exploration.DrawMap();
Procedures.player.DrawTamer(spriteBatch);
break;
}
spriteBatch.End();
base.Draw(gameTime);
}
}