Advertisement
Guest User

Untitled

a guest
Dec 11th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1.  private void PlayerMovement(float horizontal)
  2.     {
  3.  
  4.         if (!this.anim.GetCurrentAnimatorStateInfo(0).IsTag("melee"))
  5.         {
  6.             myRigidBody.velocity = new Vector2(horizontal * Speed, myRigidBody.velocity.y);
  7.         }
  8.  
  9.         if (slide && !anim.GetCurrentAnimatorStateInfo(0).IsName("SlideAnim"))
  10.         {
  11.             anim.SetBool("slide", true);
  12.         }
  13.         else if (!anim.GetCurrentAnimatorStateInfo(0).IsName("slide"))
  14.         {
  15.             anim.SetBool("slide", false);
  16.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement