Advertisement
Guest User

Untitled

a guest
Jan 15th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     if(down)
  2.             {
  3.                 if(left)
  4.                 {
  5.                     ex += SHIP_SPEED_DIAG;
  6.                     ey -= SHIP_SPEED_DIAG;
  7.                 }
  8.                 else
  9.                 {
  10.                     if(right)
  11.                     {
  12.                         ex -= SHIP_SPEED_DIAG;
  13.                         ey -= SHIP_SPEED_DIAG;
  14.                     }
  15.                     else
  16.                         ey -= SHIP_SPEED;
  17.                 }                  
  18.             }
  19.             else
  20.             {
  21.                 if(up)
  22.                 {
  23.                     if(left)
  24.                     {  
  25.                         ex += SHIP_SPEED_DIAG;
  26.                         ey += SHIP_SPEED_DIAG;
  27.                     }
  28.                     else
  29.                     {
  30.                         if(right)
  31.                         {
  32.                             ex -= SHIP_SPEED_DIAG;
  33.                             ey += SHIP_SPEED_DIAG;
  34.                         }  
  35.                         else
  36.                         {
  37.                             ey += SHIP_SPEED;
  38.                         }
  39.                     }
  40.                 }
  41.                 else
  42.                 {
  43.                     if(left)
  44.                         ex += SHIP_SPEED;
  45.                     else if(right)
  46.                         ex -= SHIP_SPEED;
  47.                 }
  48.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement