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