void Update() { if (state == 1) { if (Player.getHealth() <= 0) { state = -1; GameOverScreen.SetActive(true); } else if (enemy.getHealth() <= 0) { state = -1; //PowerUpScreen.SetActive(true); BreakDamageSources(); } } }
// Update is called once per frame void Update() { PHealth.text = "" + player.getHealth() + "/" + player.getMaxHealth(); EHealth.text = "" + enemy.getHealth() + "/" + enemy.getMaxHealth(); }