コード例 #1
0
 private void UpdateHealthBar()
 {
     currentFill = HealthModel.GetHealthPercentage();
     if (currentFill != HealthBar.fillAmount)
     {
         HealthBar.fillAmount = Mathf.Lerp(HealthBar.fillAmount, currentFill, Time.deltaTime * BarChangeSpeed);
     }
 }
コード例 #2
0
 void UpdateHealthBar()
 {
     HealthBar.localScale = new Vector3(HealthModel.GetHealthPercentage(), 1f, 1f);
 }
コード例 #3
0
 private void UpdateHealthBar() //Sets the health bar fill effect
 {
     HealthBar.localScale = new Vector3(HealthModel.GetHealthPercentage(), 1f, 1f);
 }