예제 #1
0
 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);
         }
     }
 }
예제 #2
0
    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);
            }
        }
    }