private void Awake() { myRigidbody2D = GetComponent <Rigidbody2D>(); myAnimator = GetComponent <Animator>(); light2D = GetComponent <Light2D>(); originalRotation = transform.rotation; parryScript = GetComponent <RollingPinParried>(); }
// 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) { parryScript = animator.GetComponent <RollingPinParried>(); parryScript.commenceParryAttack = true; }