X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=CarFire%2FCarFire%2FCarFire%2FHuman.cs;h=0d65d494a744cdfaf4b5a7e609af887431139200;hb=b3adecad08c0bb066d6efe041835a9636a96b066;hp=a6397166a24fa5b4b8437b6a7100d5842583a39c;hpb=1cff093c4d0b0e30919d20d51a3749caed86b98e;p=chaz%2Fcarfire diff --git a/CarFire/CarFire/CarFire/Human.cs b/CarFire/CarFire/CarFire/Human.cs index a639716..0d65d49 100644 --- a/CarFire/CarFire/CarFire/Human.cs +++ b/CarFire/CarFire/CarFire/Human.cs @@ -12,7 +12,7 @@ namespace CarFire public class Human : IPlayer { //The number of frames between each projectile is spawned. - const int shootCoolDown = 10; + const int shootCoolDown = 18; String CharName; Game game; Texture2D charModel; @@ -23,35 +23,32 @@ namespace CarFire int score; MovementManager mMotion; - bool visible; - Display theDisplay; //Used to draw projectiles int projectileSpeed; int projectileCoolDown; + int mPlayerIndex; - public Human(Game theGame, String Name, Texture2D model, Texture2D projectile, Display mDisplay, Point position) + public Human(Game theGame, String Name, Point position, int playerIndex) { game = theGame; CharName = Name; - theDisplay = mDisplay; health = 100; score = 0; visible = false; - charModel = model; - projectileModel = projectile; - projectileSpeed = 30; + projectileSpeed = 8; + mPlayerIndex = playerIndex; // Speed is the number of grid cells you can move through per second. - mMotion = new MovementManager(position, 8.0f); + mMotion = new MovementManager(position, 4.0f); } public void LoadContent(ContentManager contentManager) { - charModel = contentManager.Load("deselectBox"); //change to charModel when designed - projectileModel = contentManager.Load("emptySelectBox"); //change to a projectile model later + charModel = contentManager.Load("cs"); //change to charModel when designed + projectileModel = contentManager.Load("projectile"); //change to a projectile model later } @@ -146,8 +143,8 @@ namespace CarFire toShoot.Normalize(); toShoot *= projectileSpeed; projectileCoolDown = shootCoolDown; - theDisplay.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)); }