public void Damage(Damager d) { if (d == null) { return; } this.Damage(d.Damage); }
void OnTriggerEnter(Collider other) { Damager d = other.gameObject.GetComponent <Damager>(); this.Damage(d); }