SHARE
TWEET

Untitled

a guest Sep 20th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  if(player.transform.position.x== 0)
  2.         {
  3.             if (Input.GetKeyDown(KeyCode.A))
  4.             {
  5.                 player.transform.Translate(-1,0,0);
  6.             }
  7.             if (Input.GetKeyDown(KeyCode.D))
  8.             {
  9.                 player.transform.Translate(+1,0,0);
  10.             }
  11.         }
  12.  
  13.  
  14.         if (player.transform.position.x == -1)
  15.             {
  16.                 if (Input.GetKeyDown(KeyCode.A))
  17.                 {
  18.                 }
  19.                 if (Input.GetKeyDown(KeyCode.D))
  20.                 {
  21.                     player.transform.Translate(+1, 0, 0);
  22.                 }
  23.  
  24.             }
  25.  
  26.  
  27.         if (player.transform.position.x == +1)
  28.         {
  29.             if (Input.GetKeyDown(KeyCode.A))
  30.             {
  31.                 player.transform.Translate(-1, 0, 0);
  32.             }
  33.             if (Input.GetKeyDown(KeyCode.D))
  34.             {
  35.             }
  36.  
  37.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top