From: Kyle Date: Tue, 27 Apr 2010 05:05:01 +0000 (+0000) Subject: Changed speed of player and projectiles X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=0483d0578f0d160ea3e80bae57d4a3ba2b061d35;p=chaz%2Fcarfire Changed speed of player and projectiles git-svn-id: https://bd85.net/svn/cs3505_group@158 92bb83a3-7c8f-8a45-bc97-515c4e399668 --- diff --git a/CarFire/CarFire/CarFire/Player.cs b/CarFire/CarFire/CarFire/Player.cs index 5846050..b531255 100644 --- a/CarFire/CarFire/CarFire/Player.cs +++ b/CarFire/CarFire/CarFire/Player.cs @@ -14,7 +14,7 @@ namespace CarFire { #region Member variables //The number of frames between each projectile is spawned. - const float basePlayerSpeed = 4.0f; + const float basePlayerSpeed = 8.0f; const int shootCoolDown = 18; String CharName; Game game; @@ -57,7 +57,7 @@ namespace CarFire mPlayerIndex = playerIndex; // Speed is the number of grid cells you can move through per second. - mMotion = new MovementManager(position, 25.0f); + mMotion = new MovementManager(position, basePlayerSpeed); } public void causeDamageTo(int amount) { @@ -103,7 +103,8 @@ namespace CarFire } } - if (direction != Direction.None && !keysPressed.Contains(Keys.LeftControl)) mMotion.Update(timeSpan, direction); + if (direction != Direction.None && !keysPressed.Contains(Keys.LeftControl)) + mMotion.Update(timeSpan, direction); else mMotion.LockUpdate(timeSpan, moveLeft, moveRight, moveUp, moveDown); } diff --git a/CarFire/CarFire/CarFire/Ranged.cs b/CarFire/CarFire/CarFire/Ranged.cs index b1203dd..4121f94 100644 --- a/CarFire/CarFire/CarFire/Ranged.cs +++ b/CarFire/CarFire/CarFire/Ranged.cs @@ -20,6 +20,7 @@ namespace CarFire Texture2D projectileModel; //Used to draw projectiles + const int baseProjectileSpeed = 18; int projectileSpeed; int projectileCoolDown; #endregion @@ -28,7 +29,7 @@ namespace CarFire public Ranged(Game theGame, String Name, Point position, int playerIndex) : base(theGame, Name, position, playerIndex, baseHealth, baseDamage) { - projectileSpeed = 8; + projectileSpeed = baseProjectileSpeed; } #endregion