// Update is called once per frame void Update() { //keep ui up to date healthUI.maxHealth = (int)Mathf.Floor(defaultHealth); healthUI.SetHealth((int)Mathf.Floor(_health)); //if we are dead then we die if (_health < 1) { Die(); } //keep health updated defaultHealth = shealth * healthMultiplier; //≥≤Debug.Log (Time.time + " " + this.gameObject + _score); }