/** * starting combat - set necessary fields and UI values */ public void StartCombat() { weapon.StartCombat(); CurrentHealth = maxHealth; healthText.text = CurrentHealth.ToString() + "/" + maxHealth.ToString(); slider.value = CurrentHealth; slider.maxValue = CurrentHealth; healthBarCanvas.GetComponent <Canvas>().enabled = true; }