2 using System.Collections.Generic;
5 using Microsoft.Xna.Framework;
6 using Microsoft.Xna.Framework.Content;
7 using Microsoft.Xna.Framework.Graphics;
8 using Microsoft.Xna.Framework.Input;
20 public void LoadContent(ContentManager contentManager)
22 HUDfont = contentManager.Load<SpriteFont>("menuFont");
25 /// This is called when the game should draw itself.
27 /// <param name="spriteBatch">Used to draw with</param>
28 public void Draw(SpriteBatch spriteBatch)
30 Color[] playerColors = new Color[4];
31 playerColors[0] = Color.Red;
32 playerColors[1] = Color.PowderBlue;
33 playerColors[2] = Color.Peru;
34 playerColors[3] = Color.Wheat;
35 for (int i = 0; i < mGame.State.mCharacters.Length; i++ )
37 Player player = mGame.State.mCharacters[i];
38 spriteBatch.DrawString(HUDfont, "Player" + (i+1), new Vector2(640, 10 + 80*i), playerColors[i]);
39 spriteBatch.DrawString(HUDfont, "Health: " + player.Health, new Vector2(640, 30 + 80 * i), playerColors[i]);
40 spriteBatch.DrawString(HUDfont, "Score: " + player.Score, new Vector2(640, 50 + 80 * i), playerColors[i]);