예제 #1
0
    private void OnCollisionEnter(Collision collision)
    {
        Vida script = collision.gameObject.GetComponent <Vida>();

        if (script != null)
        {
            script.doDamage(damage);
        }
        Destroy(this.gameObject);
    }