X hits on this document

247 views

0 shares

0 downloads

0 comments

41 / 102

       }

       else

       {

           texture = defeatTexture;

       }

       ScreenManager.SpriteBatch.Draw(

           texture,

           new Vector2(ScreenManager.Game.GraphicsDevice.Viewport.Width

                       / 2 - texture.Width / 2,

                       ScreenManager.Game.GraphicsDevice.Viewport.Height

                       / 2 - texture.Height / 2),

           Color.White);

   }

   else

   {

       // Draw Player Hud

       ScreenManager.SpriteBatch.Draw(hudBackgroundTexture,

           playerHUDPosition, Color.White);

       ScreenManager.SpriteBatch.Draw(ammoTypeTexture,

           playerHUDPosition + new Vector2(33, 35), Color.White);

       DrawString(hudFont, player.Score.ToString(),

           playerHUDPosition + new Vector2(123, 35), Color.White);

       DrawString(hudFont, player.Name,

           playerHUDPosition + new Vector2(40, 1), Color.Blue);

       // Draw Computer Hud

       ScreenManager.SpriteBatch.Draw(hudBackgroundTexture,

           computerHUDPosition, Color.White);

       ScreenManager.SpriteBatch.Draw(ammoTypeTexture,

           computerHUDPosition + new Vector2(33, 35), Color.White);

       DrawString(hudFont, computer.Score.ToString(),

           computerHUDPosition + new Vector2(123, 35), Color.White);

       DrawString(hudFont, computer.Name,

           computerHUDPosition + new Vector2(40, 1), Color.Red);

       // Draw Wind direction

       string text = "WIND";

       Vector2 size = hudFont.MeasureString(text);

       Vector2 windarrowScale = new Vector2(wind.Y / 10, 1);

       ScreenManager.SpriteBatch.Draw(windArrowTexture,

           windArrowPosition, null, Color.White, 0, Vector2.Zero,

           windarrowScale, wind.X > 0

           ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0);

       DrawString(hudFont, text,

           windArrowPosition - new Vector2(0, size.Y), Color.Black);

       if (wind.Y == 0)

       {

Page | 41

Document info
Document views247
Page views247
Page last viewedTue Dec 06 17:01:13 UTC 2016
Pages102
Paragraphs3115
Words17333

Comments