From 24421b10105ddc8a33d95c5e4ccb3d6380916fa8 Mon Sep 17 00:00:00 2001 From: Kyle Date: Mon, 19 Apr 2010 20:45:01 +0000 Subject: [PATCH] git-svn-id: https://bd85.net/svn/cs3505_group@114 92bb83a3-7c8f-8a45-bc97-515c4e399668 --- CarFire/CarFire/CarFire/Human.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CarFire/CarFire/CarFire/Human.cs b/CarFire/CarFire/CarFire/Human.cs index 168fa06..d1746e3 100644 --- a/CarFire/CarFire/CarFire/Human.cs +++ b/CarFire/CarFire/CarFire/Human.cs @@ -114,6 +114,14 @@ 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 (theMap.IsCellOpen(destination)) -- 2.45.2