public void UpdateValue() { if (xpSlider != null) { xpSlider.fillAmount = (float)xp.GetFillAmount(); } }