Created
June 1, 2016 06:59
-
-
Save ThinhHB/770e63929c3c94e5bc819bb846c1fc88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------- DO | |
const string JUMP_ANIMATOR_TRIGGER = "Jump"; | |
[SerializeField] string walkAnimatorParameterName;// set it to "Jump" in Inspector | |
void Update() | |
{ | |
_animator.SetTrigger(JUMP_ANIMATOR_TRIGGER); | |
_animator.SetTrigger(walkAnimatorParameterName); | |
} | |
//------- DONT | |
void Update() | |
{ | |
_animator.SetTrigger("Jump"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment