Skip to content

Commit 4bb6bf7

Browse files
committed
removing some code duplication
1 parent e8661d9 commit 4bb6bf7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Assets/BossRoom/Scripts/Shared/Game/UI/UIHealth.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ public void Initialize(NetworkVariableInt networkedHealth, int maxValue)
2020

2121
m_HitPointsSlider.minValue = 0;
2222
m_HitPointsSlider.maxValue = maxValue;
23-
m_HitPointsSlider.value = networkedHealth.Value;
24-
// disable slider when we're at full health!
25-
m_HitPointsSlider.gameObject.SetActive(m_HitPointsSlider.value != m_HitPointsSlider.maxValue);
23+
HealthChanged(maxValue, maxValue);
2624

2725
m_NetworkedHealth.OnValueChanged += HealthChanged;
2826
}

0 commit comments

Comments
 (0)