]> Dogcows Code - chaz/carfire/blobdiff - CarFire/CarFire/CarFire/Human.cs
Rearranged stuff to make scoring work.
[chaz/carfire] / CarFire / CarFire / CarFire / Human.cs
index 3897491da0305896fb6674f3f13f08f0261282f1..0d65d494a744cdfaf4b5a7e609af887431139200 100644 (file)
@@ -28,9 +28,10 @@ namespace CarFire
         //Used to draw projectiles\r
         int projectileSpeed;\r
         int projectileCoolDown;\r
+        int mPlayerIndex;\r
         \r
 \r
-        public Human(Game theGame, String Name, Point position)\r
+        public Human(Game theGame, String Name, Point position, int playerIndex)\r
         {\r
             game = theGame;\r
             CharName = Name;\r
@@ -38,6 +39,7 @@ namespace CarFire
             score = 0;\r
             visible = false;\r
             projectileSpeed = 8;\r
+            mPlayerIndex = playerIndex;\r
 \r
             // Speed is the number of grid cells you can move through per second.\r
             mMotion = new MovementManager(position, 4.0f);\r
@@ -141,8 +143,8 @@ namespace CarFire
                     toShoot.Normalize();\r
                     toShoot *= projectileSpeed;\r
                     projectileCoolDown = shootCoolDown;\r
-                    game.State.mDisplay.AddProjectiles(new Projectile(game.State.Map, projectileModel,\r
-                        toShoot, new Point(startX, startY)));\r
+                    game.State.mDisplay.AddProjectiles(new Projectile(game, projectileModel,\r
+                        toShoot, new Point(startX, startY), mPlayerIndex));\r
 \r
              \r
                 }\r
This page took 0.019099 seconds and 4 git commands to generate.