1 using System.Collections;
2 using System.Collections.Generic;
5 public class MouseGardener : StateMachineBehaviour
9 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
10 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
12 powerUps = animator.GetComponent<PowerUps>();
15 // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
16 override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
18 if(powerUps.mouseIsGardener == true)
20 animator.SetBool("gardener", true);
24 animator.SetBool("gardener", false);
28 // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
29 override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)