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;
12 public class Melee : Player
14 #region Member Variables
15 const int hitCoolDown = 18;
16 const int baseHealth = 200;
17 const int baseDamage = 30;
19 Texture2D projectileModel;
22 #region Public Methods
23 public Melee(Game theGame, String Name, Point position, int playerIndex)
24 : base(theGame, Name, position, playerIndex, baseHealth, baseDamage)
30 #region Overridden Methods From Player
31 public override void LoadContent(ContentManager contentManager)
33 charModel = contentManager.Load<Texture2D>("cs"); //change to charModel when designed
34 projectileModel = contentManager.Load<Texture2D>("projectile"); //change to a projectile model later
38 /// This method will draw a character to the screen.
40 /// <param name="spriteBatch"></param>
41 public override void Draw(SpriteBatch spriteBatch)
43 Rectangle position = Game.State.Map.GetRectangleFromCoordinates(Motion.Position);
44 spriteBatch.Draw(charModel, position, Color.White);
47 public override void Attack(List<Keys> keysPressed)
51 else if (hitCoolDown == 0)
53 if (keysPressed.Contains<Keys>(Keys.Space))