X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fcarfire;a=blobdiff_plain;f=CarFire%2FCarFire%2FCarFire%2FMelee.cs;h=b597cb37a856cff74290d2f89c269f48a8831f98;hp=f113824b4b250ba3119bebf2714a4f38dea65faa;hb=3c616e65a6ecf3ebe7b494c9e22c96bc53a1a36f;hpb=1959205421a9a20c48133f93102e467b0f8e26f8 diff --git a/CarFire/CarFire/CarFire/Melee.cs b/CarFire/CarFire/CarFire/Melee.cs index f113824..b597cb3 100644 --- a/CarFire/CarFire/CarFire/Melee.cs +++ b/CarFire/CarFire/CarFire/Melee.cs @@ -22,6 +22,9 @@ namespace CarFire int velocityY; #endregion + //zac variable + AnimateMelee animateMelee; + #region Public Methods public Melee(Game theGame, String Name, Point position, int playerIndex) : base(theGame, Name, position, playerIndex, baseHealth, baseDamage) @@ -36,6 +39,10 @@ namespace CarFire charModel = contentManager.Load("cs"); //change to charModel when designed projectileModel = contentManager.Load("projectile"); //change to a projectile model later + /*Zac + */ + animateMelee = new AnimateMelee(contentManager, this); + } /// /// This method will draw a character to the screen. @@ -44,7 +51,11 @@ namespace CarFire public override void Draw(SpriteBatch spriteBatch) { Rectangle position = Game.State.Map.GetRectangleFromCoordinates(Motion.Position); - spriteBatch.Draw(charModel, position, Color.White); + Point aPosition = Game.State.Map.GetPointFromCoordinates(Motion.Position); + Vector2 drawPosition = new Vector2(aPosition.X, aPosition.Y); + //spriteBatch.Draw(charModel, position, Color.White); + animateMelee.AttackLeft(spriteBatch, drawPosition); + } public override void Attack(List keysPressed)