// Update is called once per frame void Update() { if (GlobalValues.PlayerHealth > 0) { HealthValueText.text = GlobalValues.PlayerHealth.ToString(); } else { GlobalValues.Die(); } }