X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fcarfire;a=blobdiff_plain;f=CarFire%2FCarFire%2FCarFire%2FHuman.cs;h=a6397166a24fa5b4b8437b6a7100d5842583a39c;hp=08d962a1e682042ef420fab99b59b8fb52815d78;hb=1cff093c4d0b0e30919d20d51a3749caed86b98e;hpb=af9deb873b24dadd0d509ce199fc6cac2b3efbc9 diff --git a/CarFire/CarFire/CarFire/Human.cs b/CarFire/CarFire/CarFire/Human.cs index 08d962a..a639716 100644 --- a/CarFire/CarFire/CarFire/Human.cs +++ b/CarFire/CarFire/CarFire/Human.cs @@ -11,16 +11,8 @@ namespace CarFire { public class Human : IPlayer { - public enum State - { - left, - right, - up, - down - }; //The number of frames between each projectile is spawned. const int shootCoolDown = 10; - State state; String CharName; Game game; Texture2D charModel; @@ -48,8 +40,6 @@ namespace CarFire health = 100; score = 0; visible = false; - //default state - state = State.up; charModel = model; projectileModel = projectile; projectileSpeed = 30; @@ -104,15 +94,6 @@ namespace CarFire bool moveRight = keysPressed.Contains(Keys.Right); bool moveUp = keysPressed.Contains(Keys.Up); bool moveDown = keysPressed.Contains(Keys.Down); - if (moveLeft) - state = State.left; - else if (moveRight) - state = State.right; - else if (moveUp) - state = State.up; - else if (moveDown) - state = State.down; - Point destination = MovementManager.GetNeighborCell(mMotion.Coordinates, moveLeft, moveRight, moveUp, moveDown); if (!keysPressed.Contains(Keys.LeftControl)) { @@ -168,32 +149,7 @@ namespace CarFire theDisplay.AddProjectiles(new Projectile(game.State.Map, projectileModel, toShoot, new Point(startX, startY))); - /* - if (state == State.up) - { - projectileCoolDown = shootCoolDown; - theDisplay.AddProjectiles(new Projectile(theMap, projectileModel, - new Vector2(0, -projectileSpeed), new Point(Coordinates.X, Coordinates.Y - 1))); - } - if (state == State.down) - { - projectileCoolDown = shootCoolDown; - theDisplay.AddProjectiles(new Projectile(theMap, projectileModel, - new Vector2(0, projectileSpeed), new Point(Coordinates.X, Coordinates.Y + 1))); - } - if (state == State.right) - { - projectileCoolDown = shootCoolDown; - theDisplay.AddProjectiles(new Projectile(theMap, projectileModel, - new Vector2(projectileSpeed, 0), new Point (Coordinates.X + 1, Coordinates.Y))); - } - if (state == State.left) - { - projectileCoolDown = shootCoolDown; - theDisplay.AddProjectiles(new Projectile(theMap, projectileModel, - new Vector2(-projectileSpeed, 0), new Point(Coordinates.X - 1, Coordinates.Y))); - } - */ + } } }