public void DisplayHealth() { healthBar.SetHealthBarValue(GetNormalisedHealthPercent(hitPoints)); if (photonView.IsMine) { GameGUI.SetHealth(GetNormalisedHealthPercent(hitPoints)); } }
public override void TakeDamage(float dmg) { base.TakeDamage(dmg); gui.SetHealth(currentHealth / maxHealth); // Update health bar }