File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Assets/BossRoom/Scripts/Shared/Game/UI Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,16 @@ public void Initialize(NetworkVariableInt networkedHealth, int maxValue)
2121 m_HitPointsSlider . minValue = 0 ;
2222 m_HitPointsSlider . maxValue = maxValue ;
2323 m_HitPointsSlider . value = networkedHealth . Value ;
24- // disable ourselves when we're at full health!
25- gameObject . SetActive ( m_HitPointsSlider . value != m_HitPointsSlider . maxValue ) ;
24+ // disable slider when we're at full health!
25+ m_HitPointsSlider . gameObject . SetActive ( m_HitPointsSlider . value != m_HitPointsSlider . maxValue ) ;
2626
2727 m_NetworkedHealth . OnValueChanged += HealthChanged ;
2828 }
2929
3030 void HealthChanged ( int previousValue , int newValue )
3131 {
3232 m_HitPointsSlider . value = newValue ;
33- gameObject . SetActive ( m_HitPointsSlider . value != m_HitPointsSlider . maxValue ) ;
33+ m_HitPointsSlider . gameObject . SetActive ( m_HitPointsSlider . value != m_HitPointsSlider . maxValue ) ;
3434 }
3535
3636 void OnDestroy ( )
You can’t perform that action at this time.
0 commit comments