Advertisement
rodrigofbm

Untitled

Apr 30th, 2015
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(Empurrar && Input.GetKey("f") && Chao && Input.GetAxis("Horizontal"))
  2.                          {
  3.                                         Animacao.SetBool("Correndo", false);
  4.                                        
  5.                                        
  6.                                         if(transform.localScale == 1)
  7.                                         {
  8.                                                 if(Input.GetAxis("Horizontal") > 0)
  9.                                                         {
  10.                                                         Animacao.SetBool("Empurrando", true);
  11.                                                         Animacao.SetBool("Puxar", false);
  12.                                                         }
  13.                                                 if(Input.GetAxis("Horizontal") < 0)
  14.                                                         {
  15.                                                         velocidade = 10;
  16.                                                         Animacao.SetBool("Empurrando", false);
  17.                                                         Animacao.SetBool("Puxar", true);
  18.                                                        
  19.                                                         }      
  20.                                        
  21.                                         }
  22.                                        
  23.                                         else
  24.                                         {
  25.                                                 if(Input.GetAxis("Horizontal") > 0)
  26.                                                         {
  27.                                                         velocidade = 10;
  28.                                                         Animacao.SetBool("Empurrando", false);
  29.                                                         Animacao.SetBool("Puxar", true);
  30.                                                         }
  31.                                                 if(Input.GetAxis("Horizontal") < 0)
  32.                                                         {
  33.                                                         Animacao.SetBool("Empurrando", true);
  34.                                                         Animacao.SetBool("Puxar", false);
  35.                                                         }      
  36.                                        
  37.                                         }
  38.                                        
  39.                                  }
  40.                                 else
  41.                                         {
  42.                                         Animacao.SetBool("Empurrando", false);
  43.                                         Animacao.SetBool("Puxar", false);
  44.                                         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement