Guest User

Untitled

a guest
Dec 15th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.20 KB | None | 0 0
  1.             if (dir == Direction.NORTH)
  2.             {
  3.                 if (!CheckCollision())
  4.                 {
  5.                     this.y -= moveSpeed;
  6.                 }
  7.                 else
  8.                 {
  9.                     this.y += 7;
  10.                 }
  11.              
  12.             }
  13.             else if (dir == Direction.SOUTH)
  14.             {
  15.                 if (!CheckCollision())
  16.                 {
  17.                     this.y += moveSpeed;
  18.                 }
  19.                 else
  20.                 {
  21.                     this.y -= 7;
  22.                 }
  23.  
  24.              
  25.             }
  26.             else if (dir == Direction.EAST)
  27.             {
  28.                 if (!CheckCollision())
  29.                 {
  30.                     this.x += moveSpeed;
  31.                 }
  32.                 else
  33.                 {
  34.                     this.x -= 7;
  35.                 }
  36.              
  37.             }
  38.             else if (dir == Direction.WEST)
  39.             {
  40.                 if (!CheckCollision())
  41.                 {
  42.                     this.x -= moveSpeed;
  43.                 }
  44.                 else
  45.                 {
  46.                     this.x += 7;
  47.                 }
  48.  
  49.              
  50.             }
  51.         }
Advertisement
Add Comment
Please, Sign In to add comment