{\r
if (keysPressed.Contains<Keys>(Keys.Space))\r
{\r
- \r
+ int startX = Coordinates.X;\r
+ int startY = Coordinates.Y;\r
+ if (Motion.Direction == Direction.Down || Motion.Direction == Direction.LowerLeft || Motion.Direction == Direction.LowerRight)\r
+ {\r
+ velocityY = 1;\r
+ startY = Coordinates.Y + 1;\r
+ }\r
+ else if (Motion.Direction == Direction.Up || Motion.Direction == Direction.UpperLeft || Motion.Direction == Direction.UpperRight)\r
+ {\r
+ velocityY = -1;\r
+ startY = Coordinates.Y - 1;\r
+ }\r
+ if (Motion.Direction == Direction.Right || Motion.Direction == Direction.LowerRight || Motion.Direction == Direction.UpperRight)\r
+ {\r
+ velocityX = 1;\r
+ startX = Coordinates.X + 1;\r
+ }\r
+ else if (Motion.Direction == Direction.Left || Motion.Direction == Direction.LowerLeft || Motion.Direction == Direction.UpperLeft)\r
+ {\r
+ velocityX = -1;\r
+ startX = Coordinates.X - 1;\r
+ }\r
+ //Attack a monster\r
+ if (!Game.IsCellOpen(new Point(startX, startY)))\r
+ {\r
+ foreach (IEntity entity in Game.State.Entities)\r
+ {\r
+ //See if it is a monster\r
+\r
+ //Damage the monster\r
+\r
+ }\r
+ }\r
}\r
}\r
\r