private void AttackLFist() { Collider[] colliders = Physics.OverlapSphere(LFist.position, 0.2f, attackTriggerLayer); foreach (Collider collider in colliders) { EnemyBeAttack enemyBeAttack = collider.GetComponent <EnemyBeAttack>(); if (enemyBeAttack != null) { enemyBeAttack.BeAttacked(LFist.position); } } }
private void AttackTwoFist() { Vector3 attackedPoint = (RFist.position + LFist.position) / 2; Collider[] colliders = Physics.OverlapSphere(attackedPoint, 0.2f, attackTriggerLayer); foreach (Collider collider in colliders) { EnemyBeAttack enemyBeAttack = collider.GetComponent <EnemyBeAttack>(); if (enemyBeAttack != null) { enemyBeAttack.BeAttacked(attackedPoint); } } }