示例#1
0
        public void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            background.Draw(spriteBatch);
            backgroundA.Draw(spriteBatch);
            backgroundC.Draw(spriteBatch);
            backgroundD.Draw(spriteBatch);
            backgroundE.Draw(spriteBatch);
            backgroundB.Draw(spriteBatch);

            spriteBatch.Begin();
            spriteBatch.Draw(shot, recShot, Color.White);
            spriteBatch.End();

            heli.Draw(spriteBatch);
            jet.Draw(spriteBatch);
            ship.Draw(spriteBatch);
            raider.Draw(spriteBatch);

            spriteBatch.Begin();
            spriteBatch.DrawString(font, "Score: " + score, new Vector2(30, recScreen.Height - 60), Color.Red);
            spriteBatch.Draw(fire, new Rectangle((recScreen.Width - 110), (recScreen.Height - 100), 85, 85), Color.White);
            //spriteBatch.DrawString(font, "Actual1: " + actual1, new Vector2(30, recScreen.Height - 80), Color.Yellow);
            //spriteBatch.DrawString(font, "Actual2: " + actual2, new Vector2(30, recScreen.Height - 50), Color.Yellow);
            spriteBatch.End();
            base.Draw(gameTime);
        }