private void OnCollisionEnter(Collision collision) { IHitable hitable = collision.collider.GetComponent <IHitable>(); if (hitable != null) { hitable.TakeDamage(damage); } Destroy(); }
private void OnCollisionEnter(Collision collision) { IHitable hitable = collision.collider.GetComponent <IHitable>(); if (hitable != null) { hitable.TakeDamage(damage); } Destroy(); }