]> Dogcows Code - chaz/carfire/blobdiff - CarFire/CarFire/CarFire/AnimateMelee.cs
git-svn-id: https://bd85.net/svn/cs3505_group@169 92bb83a3-7c8f-8a45-bc97-515c4e399668
[chaz/carfire] / CarFire / CarFire / CarFire / AnimateMelee.cs
index bda8912f9bfe602fb7d6f2e28a28fd8dd75d1a73..613c594a4f3a010cbb7dea44fb67b4dcbef0a7c2 100644 (file)
@@ -20,6 +20,7 @@ namespace CarFire
         //private SpriteBatch spriteBatch;\r
         private bool changedGraphic;\r
         private string lastPh;\r
+        private int row;\r
         private string ph;\r
         private Vector2 position;\r
         private SpriteBatch character;\r
@@ -43,9 +44,26 @@ namespace CarFire
 \r
         //methods\r
 \r
+        public void AttackDown(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[0];\r
+            row = 0;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void AttackDownLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[0];\r
+            row = 1;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
         public void AttackLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
         {\r
             ph = fileNames[0];\r
+            row = 2;\r
             if (lastPh == ph)\r
                 changedGraphic = false;\r
             else\r
@@ -56,18 +74,327 @@ namespace CarFire
             //character = new SpriteBatch(spriteBatch.GraphicsDevice);\r
             character = spriteBatch;\r
             Animate(drawSpot);\r
+        }\r
+\r
+        public void AttackUpLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[0];\r
+            row = 4;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void AttackUp(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[0];\r
+            row = 4;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void AttackUpRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[0];\r
+            row = 5;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void AttackRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[0];\r
+            row = 6;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void AttackDownRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[0];\r
+            row = 7;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        // death\r
+\r
+        public void DieDown(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[1];\r
+            row = 0;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void DieDownLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[1];\r
+            row = 1;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void DieLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[1];\r
+            row = 2;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void DieUpLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[1];\r
+            row = 4;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void DieUp(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[1];\r
+            row = 4;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void DieUpRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[1];\r
+            row = 5;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void DieRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[1];\r
+            row = 6;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void DieDownRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[1];\r
+            row = 7;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
 \r
+        //melee explosion\r
+        public void ExplodeDown(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[2];\r
+            row = 0;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
 \r
-            // SpriteTexture.Load(graphics.GraphicsDevice, contentManager, "fileNames[0]", 8, 12, true, 1);\r
+        public void ExplodeDownLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[2];\r
+            row = 1;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
         }\r
 \r
+        public void ExplodeLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[2];\r
+            row = 2;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void ExplodeUpLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[2];\r
+            row = 4;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void ExplodeUp(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[2];\r
+            row = 4;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void ExplodeUpRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[2];\r
+            row = 5;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void ExplodeRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[2];\r
+            row = 6;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void ExplodeDownRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[2];\r
+            row = 7;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        //melee standing\r
+        /*\r
+         * to do \r
+         * change this from standard animation to only take into account one frame\r
+         */\r
+        public void StandDown(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[3];\r
+            row = 0;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void StandDownLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[3];\r
+            row = 1;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void StandLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[3];\r
+            row = 2;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void StandUpLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[3];\r
+            row = 4;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void StandUp(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[3];\r
+            row = 4;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void StandUpRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[3];\r
+            row = 5;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void StandRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[3];\r
+            row = 6;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void StandDownRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[3];\r
+            row = 7;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        //walking\r
+\r
+        public void WalkDown(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[4];\r
+            row = 0;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void WalkDownLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[4];\r
+            row = 1;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void WalkLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[4];\r
+            row = 2;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void WalkUpLeft(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[4];\r
+            row = 4;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void WalkUp(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[4];\r
+            row = 4;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void WalkUpRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[4];\r
+            row = 5;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void WalkRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[4];\r
+            row = 6;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+        public void WalkDownRight(SpriteBatch spriteBatch, Vector2 drawSpot)\r
+        {\r
+            ph = fileNames[4];\r
+            row = 7;\r
+            character = spriteBatch;\r
+            Animate(drawSpot);\r
+        }\r
+\r
+\r
+\r
+\r
         public void Animate(Vector2 drawSpot)\r
         {\r
             //character = new SpriteBatch(graphics.GraphicsDevice);\r
             // "character" is the name of the sprite asset in the project.\r
             Console.WriteLine(ph);\r
+            //SpriteTexture.Load(character.GraphicsDevice, contentManager, ph, 8, 12, true, row);\r
+            \r
             if(changedGraphic)\r
                 SpriteTexture.Load(character.GraphicsDevice, contentManager, ph, 8, 12, true, 1);\r
+\r
             //viewport = graphics.GraphicsDevice.Viewport;\r
             position = new Vector2(Player.Coordinates.X*Map.PixelsToUnitSquares, Player.Coordinates.Y*Map.PixelsToUnitSquares);//viewport.Width / 2, 0);//viewport.Height / 2f);\r
             Console.WriteLine(drawSpot);\r
This page took 0.027147 seconds and 4 git commands to generate.