/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); niebo = Content.Load <Texture2D>("niebo"); control = Content.Load <Texture2D>("control"); animRakiety = Content.Load <Texture2D>("AnimRakiety"); meteor = Content.Load <Texture2D>("meteor"); pocisk = Content.Load <Texture2D>("pocisk2D"); gameOver = Content.Load <Texture2D>("gameOver"); wybuchRaz = Content.Load <Song>("boom"); font = Content.Load <SpriteFont>("czcionka"); nrKlatki_Rakieta = 0; nrKlatki_Meteor = 0; ileCykli = 0; punkty = 0; gracz = new Rakieta(animRakiety, pocisk); wrog = new Meteor(meteor); wrog2 = new Meteor(meteor); }
public void Draw(Texture2D texture2D, SpriteBatch spriteBatch, Meteor meteor, Rectangle rectangle) { Rectangle rectMeteor = new Rectangle((int)meteor.GetPosition().X, (int)meteor.GetPosition().Y, rectangle.Width, rectangle.Height); spriteBatch.Draw(texture2D, rectMeteor, rectangle, Color.White); }