public void Damage(float dmg) { Health -= dmg; if (display != null) { display.Display(Health); } if (Health <= 0) { owner.Destroy(); } }
private void Start() { display = owner.GetComponent <DamageDisplay>(); display.Display(Health); }