コード例 #1
0
    void OnCollisionEnter2D(Collision2D other)
    {
        DamageController e = other.collider.GetComponent <DamageController>();

        if (e != null)
        {
            e.Fix(); //Destroy bot if shot hit
        }

        Destroy(gameObject); //Destroy projectile
    }