X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fcarfire;a=blobdiff_plain;f=CarFire%2FCarFire%2FCarFire%2FHuman.cs;h=0d65d494a744cdfaf4b5a7e609af887431139200;hp=3897491da0305896fb6674f3f13f08f0261282f1;hb=b3adecad08c0bb066d6efe041835a9636a96b066;hpb=f69be675ab1a1a9ab4b478f213c7b708d59820f2 diff --git a/CarFire/CarFire/CarFire/Human.cs b/CarFire/CarFire/CarFire/Human.cs index 3897491..0d65d49 100644 --- a/CarFire/CarFire/CarFire/Human.cs +++ b/CarFire/CarFire/CarFire/Human.cs @@ -28,9 +28,10 @@ namespace CarFire //Used to draw projectiles int projectileSpeed; int projectileCoolDown; + int mPlayerIndex; - public Human(Game theGame, String Name, Point position) + public Human(Game theGame, String Name, Point position, int playerIndex) { game = theGame; CharName = Name; @@ -38,6 +39,7 @@ namespace CarFire score = 0; visible = false; projectileSpeed = 8; + mPlayerIndex = playerIndex; // Speed is the number of grid cells you can move through per second. mMotion = new MovementManager(position, 4.0f); @@ -141,8 +143,8 @@ namespace CarFire toShoot.Normalize(); toShoot *= projectileSpeed; projectileCoolDown = shootCoolDown; - game.State.mDisplay.AddProjectiles(new Projectile(game.State.Map, projectileModel, - toShoot, new Point(startX, startY))); + game.State.mDisplay.AddProjectiles(new Projectile(game, projectileModel, + toShoot, new Point(startX, startY), mPlayerIndex)); }