void Update() { if (healthForeground != null) { healthForeground.localScale = new Vector3(health.GetCurHealth() / health.GetCurMaxHealth(), healthForeground.localScale.y, healthForeground.localScale.z); } if (armourForeground != null) { armourForeground.localScale = new Vector3(health.GetCurArmour() / 100.0f, armourForeground.localScale.y, armourForeground.localScale.z); } if (healthCount != null) { healthCount.text = health.GetCurHealth().ToString() + "/" + health.GetCurMaxHealth().ToString() + " | " + health.GetCurArmour(); } if (scoreCount != null && playerAttributes != null) { scoreCount.text = "Score:\n" + playerAttributes.GetCurPlayerScore().ToString(); } }