I am just begining XNA and I am trying to do a 2D game but one of my pictures(Textures, Sprites, what-ever-you-call-it) won't load. I tried renaming it but still it doesn't recognize it. at first i thought it was hiding so I made the picture white (Because the background was black) and i still couldn't find it. help? Here are the pictures of the app and the space ship
http://s1209.photobucket.com/albums/cc382/majorawsoem/Space%20Invaders/
Heres the code
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace Space_Invaders
{
/// <summary>
/// This is the main type for your game
///
/// </summary>
public class Game1 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
}
private Texture2D Black1080p;
private Texture2D spaceinvaderboss;
private Texture2D chicken;
protected override void Initialize()
{
Black1080p = Content.Load<Texture2D>("Black1080p");
chicken = Content.Load<Texture2D>("chicken");
spaceinvaderboss = Content.Load<Texture2D>("spaceinvaderboss");
base.Initialize();
}
/// <summary>
/// LoadContent will be called once per game and is the place to load
/// all of your content.
/// </summary>
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
}
/// <summary>
/// UnloadContent will be called once per game and is the place to unload
/// all content.
/// </summary>
protected override void UnloadContent()
{
// TODO: Unload any non ContentManager content here
}
/// <summary>
/// Allows the game to run logic such as updating the world,
/// checking for collisions, gathering input, and playing audio.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Update(GameTime gameTime)
{
// Allows the game to exit
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
this.Exit();
// TODO: Add your update logic here
base.Update(gameTime);
}
/// <summary>
/// This is called when the game should draw itself.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
spriteBatch.Begin();
spriteBatch.Draw(Black1080p, new Rectangle(0, 0, 1920, 1080), Color.White);
spriteBatch.Draw(chicken, new Vector2(32, 32), Color.White);
spriteBatch.Draw(spaceinvaderboss, new Vector2(32, 32), Color.White);
spriteBatch.End();
base.Draw(gameTime);
}
}
}