Beispiel #1
0
    private void OnCollisionEnter(Collision collision)
    {
        Hittable hit = collision.gameObject.GetComponent <Hittable>();

        if (hit != null)
        {
            hit.TakeDamage(this.damage);
        }
        Destroy(gameObject);
    }