Skip to content

Instantly share code, notes, and snippets.

@kihira
Created November 24, 2015 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kihira/6c32a16547384d401239 to your computer and use it in GitHub Desktop.
Save kihira/6c32a16547384d401239 to your computer and use it in GitHub Desktop.
// Animation
if (translation.x > 0)
{
GetComponent<Animator>().SetInteger("animState", 2);
}
else if (translation.x < 0)
{
GetComponent<Animator>().SetInteger("animState", 1);
}
else
{
GetComponent<Animator>().SetInteger("animState", 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment