コード例 #1
0
    private void OnTriggerEnter(Collider other)
    {
        DamageController damageController = other.transform.GetComponentInParent <DamageController>();

        if (damageController)
        {
            damageController.GetHit(transform.position);
            Destroy(gameObject);
        }
    }