Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. public GameObject rangeBtn;
  2. public Animator rangeBtnAnim;
  3.  
  4. private void Start()
  5. {
  6. if ((rangeBtn != null) && (rangeBtn.GetComponent<Animator>() != null))
  7. {
  8. rangeBtnAnim = rangeBtn.GetComponent<Animator>();
  9. }
  10. }
  11.  
  12.  
  13. public void PlayAnimation()
  14. {
  15. rangeBtnAnim.Play("RangeSelectionButton_Pressed");
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement