// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { fieldCollide = animator.GetComponent <HackerFieldCollide>(); fieldCollide.enabled = true; control = animator.GetComponent <HackerFieldControl> (); control.SetHackMoveSpeed(); }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { control = animator.transform.GetComponent <HackerFieldControl> (); control.SetChargeMoveSpeed(); canceled = false; animator.SetFloat("chargeSpeed", 1.0f); control.PlayForward(); control.PlayChargeSound(); }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { control = animator.GetComponent <HackerFieldControl> (); control.ResetMoveSpeed(); }