public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     animator.GetComponent <OffensiveHitboxManager> ().OnHit += Blegh;
     base.OnStateEnter(animator, stateInfo, layerIndex);
     attack = attackLogic.GetCurrentAttack();
     if (animator.GetComponent <Stamina> ().IsStaminaAvailable())
     {
         Attack();
     }
 }
Esempio n. 2
0
 void OnTriggerEnter(Collider col)
 {
     if (col.transform.GetComponentInParent <AttackLogic> () != attackController)
     {
         attackController = col.transform.GetComponentInParent <AttackLogic> ();
     }
     StoreImpactInfo(attackController.GetCurrentAttack());
     if (OnImpact != null)
     {
         OnImpact(this, new OnReceivingHitEventArgs(attackController, gameObject));
     }
 }