]> Dogcows Code - chaz/carfire/blob - CarFire/CarFire/CarFire/Melee.cs
Cleaned up a bit
[chaz/carfire] / CarFire / CarFire / CarFire / Melee.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using Microsoft.Xna.Framework;
6 using Microsoft.Xna.Framework.Content;
7 using Microsoft.Xna.Framework.Graphics;
8 using Microsoft.Xna.Framework.Input;
9
10 namespace CarFire
11 {
12 public class Melee : Player
13 {
14 #region Member Variables
15 const int hitCoolDown = 18;
16 const int baseHealth = 200;
17 const int baseDamage = 30;
18 int coolDown;
19 Texture2D charModel;
20 Texture2D projectileModel;
21 #endregion
22
23 #region Public Methods
24 public Melee(Game theGame, String Name, Point position, int playerIndex)
25 : base(theGame, Name, position, playerIndex, baseHealth, baseDamage)
26 {
27 coolDown = hitCoolDown;
28 }
29 #endregion
30
31 #region Overridden Methods From Player
32 public override void LoadContent(ContentManager contentManager)
33 {
34 charModel = contentManager.Load<Texture2D>("cs"); //change to charModel when designed
35 projectileModel = contentManager.Load<Texture2D>("projectile"); //change to a projectile model later
36
37 }
38 /// <summary>
39 /// This method will draw a character to the screen.
40 /// </summary>
41 /// <param name="spriteBatch"></param>
42 public override void Draw(SpriteBatch spriteBatch)
43 {
44 Rectangle position = Game.State.Map.GetRectangleFromCoordinates(Motion.Position);
45 spriteBatch.Draw(charModel, position, Color.White);
46 }
47
48 public override void Attack(List<Keys> keysPressed)
49 {
50 if (coolDown > 0)
51 coolDown--;
52 else if (coolDown == 0)
53 {
54 if (keysPressed.Contains<Keys>(Keys.Space))
55 {
56
57 }
58 }
59
60
61 }
62 public override void PlayAttackSound()
63 {
64
65 }
66 public override void PlayDieSound()
67 {
68
69 }
70 #endregion
71 }
72 }
This page took 0.033673 seconds and 5 git commands to generate.