// Update is called once per frames void Update() { currentHealth -= staticDamage * Time.deltaTime; if (currentHealth < 0 && !isDead) { playerController.Crash(); } UpdateUI(); }