Advertisement
zamoth

Untitled

Nov 23rd, 2014
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.41 KB | None | 0 0
  1. public class mecanimSpartan : MonoBehaviour {
  2.  
  3.     public Animator animacao;
  4.  
  5.     void Update (){
  6.  
  7.         if(Input.GetMouseButtonDown(0))
  8.             animacao.SetInteger("parametro", 1);
  9.         if(Input.GetMouseButtonUp(0))
  10.             animacao.SetInteger("parametro", 0);
  11.  
  12.         if(Input.GetButton("Horizontal") || Input.GetButton("Vertical"))
  13.             animacao.SetInteger("corrida", 3);
  14.  
  15.         else
  16.             animacao.SetInteger("corrida", 0);
  17.  
  18.  
  19.     }
  20.  
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement