]> Dogcows Code - chaz/carfire/commitdiff
Moved some basic stuff around to remove the CharacterTestBed, everything should compi...
authorbrady <brady@92bb83a3-7c8f-8a45-bc97-515c4e399668>
Thu, 15 Apr 2010 02:30:38 +0000 (02:30 +0000)
committerbrady <brady@92bb83a3-7c8f-8a45-bc97-515c4e399668>
Thu, 15 Apr 2010 02:30:38 +0000 (02:30 +0000)
git-svn-id: https://bd85.net/svn/cs3505_group@78 92bb83a3-7c8f-8a45-bc97-515c4e399668

CarFire/CarFire/CarFire.sln
CarFire/CarFire/CarFire/CarFire.csproj
CarFire/CarFire/CarFire/Character.cs [moved from CarFire/CarFire/CharacterTestBed/Character.cs with 86% similarity]
CarFire/CarFire/CarFire/Projectile.cs [moved from CarFire/CarFire/CharacterTestBed/Projectile.cs with 92% similarity]
CarFire/CarFire/CharacterTestBed/CharacterTestBed.csproj

index 2583a8e9e8b77a8d079526961fc6631df43fa7fd..6cd944df6c1bbb085485eb0868103d739602b03d 100644 (file)
@@ -37,18 +37,6 @@ Global
                {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Release|x86.Build.0 = Release|x86\r
                {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Release|Xbox 360.ActiveCfg = Release|x86\r
                {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Release|Zune.ActiveCfg = Release|x86\r
-               {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|x86.ActiveCfg = Debug|x86\r
-               {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|Xbox 360.ActiveCfg = Debug|x86\r
-               {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|Zune.ActiveCfg = Debug|x86\r
-               {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|x86.ActiveCfg = Release|x86\r
-               {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|Xbox 360.ActiveCfg = Release|x86\r
-               {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|Zune.ActiveCfg = Release|x86\r
-               {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Debug|x86.ActiveCfg = Debug|x86\r
-               {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Debug|Xbox 360.ActiveCfg = Debug|x86\r
-               {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Debug|Zune.ActiveCfg = Debug|x86\r
-               {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Release|x86.ActiveCfg = Release|x86\r
-               {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Release|Xbox 360.ActiveCfg = Release|x86\r
-               {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Release|Zune.ActiveCfg = Release|x86\r
                {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Debug|x86.ActiveCfg = Debug|x86\r
                {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Debug|x86.Build.0 = Debug|x86\r
                {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360\r
@@ -61,6 +49,12 @@ Global
                {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Release|Xbox 360.Build.0 = Release|Xbox 360\r
                {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Release|Zune.ActiveCfg = Release|Zune\r
                {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Release|Zune.Build.0 = Release|Zune\r
+               {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|x86.ActiveCfg = Debug|x86\r
+               {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|Xbox 360.ActiveCfg = Debug|x86\r
+               {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|Zune.ActiveCfg = Debug|x86\r
+               {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|x86.ActiveCfg = Release|x86\r
+               {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|Xbox 360.ActiveCfg = Release|x86\r
+               {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|Zune.ActiveCfg = Release|x86\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index 30d2d0dd703cc40d5e3e1979e3f3c4bb91607483..dc31e0359ffcb767e9ffbfd72a480f588440287b 100644 (file)
@@ -84,6 +84,7 @@
     </Reference>\r
   </ItemGroup>\r
   <ItemGroup>\r
+    <Compile Include="Character.cs" />\r
     <Compile Include="ChatInfo.cs" />\r
     <Compile Include="Game.cs" />\r
     <Compile Include="IDeterministicGame.cs" />\r
@@ -92,6 +93,7 @@
     <Compile Include="MapReader.cs" />\r
     <Compile Include="NetworkManager.cs" />\r
     <Compile Include="Parse.cs" />\r
+    <Compile Include="Projectile.cs" />\r
     <Compile Include="Properties\AssemblyInfo.cs" />\r
     <Compile Include="Program.cs" />\r
     <Compile Include="XnaGame.cs" />\r
similarity index 86%
rename from CarFire/CarFire/CharacterTestBed/Character.cs
rename to CarFire/CarFire/CarFire/Character.cs
index 863797fcec588c2bccd0cd70bd7fc029611a1d1e..e2c8aedfba98afcee9f0d45a27dfe0c1a96b7c59 100644 (file)
@@ -104,7 +104,7 @@ namespace CarFire
 \r
 \r
         }\r
-\r
+        /*\r
         /// <summary>\r
         /// Updates the players position in the current window, the player is kept centered\r
         /// in the window when possible. When the edge of the map is reached by one or more\r
@@ -115,6 +115,7 @@ namespace CarFire
         /// <param name="ScreenHeight">Used to know how tall the current window is</param>\r
         public void updatePlayerScreenPosition(int ScreenWidth, int ScreenHeight)\r
         {\r
+\r
             // if left edge of map has been reached by screen\r
             if (GridX * TheMap.GridToPixelRatio < ScreenWidth / 2)\r
             {\r
@@ -147,7 +148,7 @@ namespace CarFire
                 PixelY = ScreenHeight / 2;\r
             }\r
         }\r
-\r
+        */\r
         /// <summary>\r
         /// Moves the current player being controlled based on a given set of key presses.\r
         /// The player can only move one Grid space per movePlayer call. Thus this method\r
@@ -159,46 +160,46 @@ namespace CarFire
         {\r
             // move upleft\r
             keysPressed.Contains<Keys>(Keys.Left);\r
-            if (keysPressed.Contains<Keys>(Keys.Up) && keysPressed.Contains<Keys>(Keys.Left) && TheMap.isOpenSquare(GridX - 1, GridY - 1))\r
+            if (keysPressed.Contains<Keys>(Keys.Up) && keysPressed.Contains<Keys>(Keys.Left) && TheMap.IsCellOpen(GridX - 1, GridY - 1))\r
             {\r
                 GridX -= 1;\r
                 GridY -= 1;\r
             }\r
             // move upright\r
-            else if (keysPressed.Contains<Keys>(Keys.Up) && keysPressed.Contains<Keys>(Keys.Right) && TheMap.isOpenSquare(GridX + 1, GridY - 1))\r
+            else if (keysPressed.Contains<Keys>(Keys.Up) && keysPressed.Contains<Keys>(Keys.Right) && TheMap.IsCellOpen(GridX + 1, GridY - 1))\r
             {\r
                 GridX += 1;\r
                 GridY -= 1;\r
             }\r
             // move downleft\r
-            else if (keysPressed.Contains<Keys>(Keys.Down) && keysPressed.Contains<Keys>(Keys.Left) && TheMap.isOpenSquare(GridX - 1, GridY + 1))\r
+            else if (keysPressed.Contains<Keys>(Keys.Down) && keysPressed.Contains<Keys>(Keys.Left) && TheMap.IsCellOpen(GridX - 1, GridY + 1))\r
             {\r
                 GridX -= 1;\r
                 GridY += 1;\r
             }\r
             // move downright\r
-            else if (keysPressed.Contains<Keys>(Keys.Down) && keysPressed.Contains<Keys>(Keys.Right) && TheMap.isOpenSquare(GridX + 1, GridY + 1))\r
+            else if (keysPressed.Contains<Keys>(Keys.Down) && keysPressed.Contains<Keys>(Keys.Right) && TheMap.IsCellOpen(GridX + 1, GridY + 1))\r
             {\r
                 GridX += 1;\r
                 GridY += 1;\r
             }\r
             // move up\r
-            else if (keysPressed.Contains<Keys>(Keys.Up) && TheMap.isOpenSquare(GridX, GridY - 1))\r
+            else if (keysPressed.Contains<Keys>(Keys.Up) && TheMap.IsCellOpen(GridX, GridY - 1))\r
             {\r
                 GridY -= 1;\r
             }\r
             // move down\r
-            else if (keysPressed.Contains<Keys>(Keys.Down) && TheMap.isOpenSquare(GridX, GridY + 1))\r
+            else if (keysPressed.Contains<Keys>(Keys.Down) && TheMap.IsCellOpen(GridX, GridY + 1))\r
             {\r
                 GridY += 1;\r
             }\r
             // move left\r
-            else if (keysPressed.Contains<Keys>(Keys.Left) && TheMap.isOpenSquare(GridX - 1, GridY))\r
+            else if (keysPressed.Contains<Keys>(Keys.Left) && TheMap.IsCellOpen(GridX - 1, GridY))\r
             {\r
                 GridX -= 1;\r
             }\r
             // move right\r
-            else if (keysPressed.Contains<Keys>(Keys.Right) && TheMap.isOpenSquare(GridX + 1, GridY))\r
+            else if (keysPressed.Contains<Keys>(Keys.Right) && TheMap.IsCellOpen(GridX + 1, GridY))\r
             {\r
                 GridX += 1;\r
             }\r
@@ -227,37 +228,4 @@ namespace CarFire
 \r
         }\r
     }\r
-    /*\r
-    //this is for testing purposes only!\r
-    public class Map\r
-    {\r
-        int gridToPixelRatio;\r
-\r
-        public Map()\r
-        {\r
-            gridToPixelRatio = 10;\r
-        }\r
-\r
-        public int MaxGridX\r
-        {\r
-            get { return 100; }\r
-        }\r
-        public int MaxGridY\r
-        {\r
-            get { return 100; }\r
-        }\r
-\r
-        public int GridToPixelRatio\r
-        {\r
-            get { return gridToPixelRatio; }\r
-        }\r
-\r
-        public bool isOpenSquare(int GridX, int GridY)\r
-        {\r
-            return true;\r
-        }\r
-\r
-\r
-    }\r
-     */\r
 }
\ No newline at end of file
similarity index 92%
rename from CarFire/CarFire/CharacterTestBed/Projectile.cs
rename to CarFire/CarFire/CarFire/Projectile.cs
index dfbc87b9e1afd438dba99c7766dc786eb9d2fa8b..e9fd47b2cc95b06eb8b5cbc379a1728e48b1cda3 100644 (file)
@@ -55,14 +55,15 @@ namespace CarFire
         public void Update()\r
         {\r
             //See if something moved onto this projectile.\r
-            if(theMap.isOpenSquare(gridX, gridY))\r
+            if(theMap.IsCellOpen(gridX, gridY))\r
             {\r
-                theMap.damageSquare(gridX, gridY, damage);\r
+                //theMap.damageSquare(gridX, gridY, damage);\r
             }\r
             //If the projectile will be moving to a new grid position we need to check to see if it is occupied.\r
+            /*\r
             if ((int)((pixelX + velocity.X) / theMap.gridToPixelRatio) != gridX || (int)((pixelY + velocity.Y) / Map.gridToPixelRatio) != gridY)\r
             {\r
-                bool open = theMap.isOpenSquare((pixelX + velocity.X) / theMap.gridToPixelRatio, (pixelY + velocity.Y) / Map.gridToPixelRatio);\r
+                bool open = theMap.IsCellOpen((pixelX + velocity.X) / theMap.gridToPixelRatio, (pixelY + velocity.Y) / Map.gridToPixelRatio);\r
                 //If open just move this projectile there\r
                 //***Map doesn't need to know that this projectile is there because players/monsters are allowed\r
                 // to move into the path of projectiles.\r
@@ -80,6 +81,7 @@ namespace CarFire
                     //theMap.damageSquare(gridX, gridY, damage);\r
                 }\r
             }\r
+            */\r
             //If it is not moving grid positions just increment pixelX and pixelY\r
             else\r
             {\r
index 9e3111cc813d82da8eac3fcc768cb6d1a2e55717..2541ff6752128f492e2c7c8ad5f0ecd94584d9a1 100644 (file)
@@ -84,8 +84,6 @@
     </Reference>\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <Compile Include="Character.cs" />\r
-    <Compile Include="Projectile.cs" />\r
     <Compile Include="Properties\AssemblyInfo.cs" />\r
     <Compile Include="Program.cs" />\r
     <Compile Include="Game1.cs" />\r
This page took 0.035548 seconds and 4 git commands to generate.