void SubstractHealth() { if (!hasCooldown) { if (health > 0) { health--; hasCooldown = true; StartCoroutine(Cooldown()); } if (health <= 0) { changeScene.ChangeSceneto("FirstLevel"); } Emptyhearts(); } }
void SubstractHealth() { if (!hasCooldown) { if (health > 0) { health--; hasCooldown = true; StartCoroutine(Cooldown()); } if (health <= 0) { changeScene.ChangeSceneto("FirstLevel"); } Emptyhearts(); } }