public void IncreaseHealth(float value) { health += value; if (health > 100.0f) { health = 100.0f; } healthHandler.updateSlider(); }
// Start is called before the first frame update void Start() { health = 100.0f; initialTime = Time.time; healthHandler = GameObject.FindObjectOfType <HealthHandler>(); healthHandler.updateSlider(); }