+ float velocityX = 0;\r
+ float velocityY = 0;\r
+ int startX = Coordinates.X;\r
+ int startY = Coordinates.Y;\r
+ if (mMotion.Direction == Direction.Down || mMotion.Direction == Direction.LowerLeft || mMotion.Direction == Direction.LowerRight)\r
+ {\r
+ velocityY = 1;\r
+ startY = Coordinates.Y + 1;\r
+ }\r
+ else if (mMotion.Direction == Direction.Up || mMotion.Direction == Direction.UpperLeft || mMotion.Direction == Direction.UpperRight)\r
+ {\r
+ velocityY = -1;\r
+ startY = Coordinates.Y - 1;\r
+ }\r
+ if (mMotion.Direction == Direction.Right || mMotion.Direction == Direction.LowerRight || mMotion.Direction == Direction.UpperRight)\r
+ {\r
+ velocityX = 1;\r
+ startX = Coordinates.X + 1;\r
+ }\r
+ else if (mMotion.Direction == Direction.Left || mMotion.Direction == Direction.LowerLeft || mMotion.Direction == Direction.UpperLeft)\r
+ {\r
+ velocityX = -1;\r
+ startX = Coordinates.X - 1;\r
+ }\r
+ Vector2 toShoot = new Vector2(velocityX, velocityY);\r
+ toShoot.Normalize();\r
+ toShoot *= projectileSpeed;\r
+ projectileCoolDown = shootCoolDown;\r
+ theDisplay.AddProjectiles(new Projectile(theMap, projectileModel,\r
+ toShoot, new Point(startX, startY)));\r
+\r
+ /*\r