private void UpdateReloadSlider() { if (assaultRifle.isReloading) { reloadSlider.gameObject.GetComponent <RectTransform>().anchoredPosition = transform.position + reloadSliderOffset; reloadSlider.value = assaultRifle.ReloadProgress(); } else { reloadSlider.gameObject.GetComponent <RectTransform>().anchoredPosition = new Vector3(100, 100, 100); } }