Esempio n. 1
0
    void SubstractHealth()
    {
        if (!hasCooldown)
        {
            if (health > 0)
            {
                health--;
                hasCooldown = true;

                StartCoroutine(Cooldown());
            }
            if (health <= 0)
            {
                changeScene.ChangeSceneto("FirstLevel");
            }

            Emptyhearts();
        }
    }