Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(Empurrar && Input.GetKey("f") && Chao && Input.GetAxis("Horizontal"))
- {
- Animacao.SetBool("Correndo", false);
- if(transform.localScale == 1)
- {
- if(Input.GetAxis("Horizontal") > 0)
- {
- Animacao.SetBool("Empurrando", true);
- Animacao.SetBool("Puxar", false);
- }
- if(Input.GetAxis("Horizontal") < 0)
- {
- velocidade = 10;
- Animacao.SetBool("Empurrando", false);
- Animacao.SetBool("Puxar", true);
- }
- }
- else
- {
- if(Input.GetAxis("Horizontal") > 0)
- {
- velocidade = 10;
- Animacao.SetBool("Empurrando", false);
- Animacao.SetBool("Puxar", true);
- }
- if(Input.GetAxis("Horizontal") < 0)
- {
- Animacao.SetBool("Empurrando", true);
- Animacao.SetBool("Puxar", false);
- }
- }
- }
- else
- {
- Animacao.SetBool("Empurrando", false);
- Animacao.SetBool("Puxar", false);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement