/// <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); // STUDENTS: load teddy and pickup sprites teddySprite = Content.Load <Texture2D>("teddybear"); pickupSprite = Content.Load <Texture2D>("pickup"); // STUDENTS: create teddy object centered in window teddy = new Teddy(teddySprite, new Vector2(WINDOW_WIDTH / 2 - teddySprite.Width / 2, WINDOW_HEIGHT / 2 - teddySprite.Height / 2)); }
/// <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); // STUDENTS: load teddy and pickup sprites teddySprite = Content.Load<Texture2D>("teddybear"); pickupSprite = Content.Load<Texture2D>("pickup"); // STUDENTS: create teddy object centered in window teddy = new Teddy(teddySprite, new Vector2(WINDOW_WIDTH / 2 - teddySprite.Width / 2, WINDOW_HEIGHT / 2 - teddySprite.Height / 2)); }
/// <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); // STUDENTS: load teddy and pickup sprites //loading sprites teddySprite = Content.Load <Texture2D>("teddybear"); pickupSprite = Content.Load <Texture2D>("pickup"); // STUDENTS: create teddy object centered in window // define location and create teddy at that location Vector2 location = new Vector2(0.5f * WINDOW_WIDTH, 0.5f * WINDOW_HEIGHT); teddy = new Teddy(teddySprite, location); }
/// <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); // STUDENTS: load teddy and pickup sprites //loading sprites teddySprite = Content.Load<Texture2D>("teddybear"); pickupSprite = Content.Load<Texture2D>("pickup"); // STUDENTS: create teddy object centered in window // define location and create teddy at that location Vector2 location = new Vector2(0.5f * WINDOW_WIDTH, 0.5f * WINDOW_HEIGHT); teddy = new Teddy(teddySprite, location); }
/// <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); // STUDENTS: load teddy and pickup sprites teddySprite = Content.Load<Texture2D>("teddybear"); pickupSprite = Content.Load<Texture2D>("pickup"); // STUDENTS: create teddy object centered in window location.X = WINDOW_WIDTH/2; location.Y = WINDOW_HEIGHT/2; teddy = new Teddy(teddySprite,location); }