Ejemplo n.º 1
0
    public void CheckDead()
    {
        for (int i = 0; i < 4; i++)
        {
            if (enemyCharacter[i].health <= 0)
            {
                alive[i] = false;
            }
            else
            {
                alive[i] = true;
            }
        }

        if (alive[0] == false && alive[1] == false && alive[2] == false && alive[3] == false)
        {
            if (fightManager.wave == fightManager.maxWave)
            {
                fightManager.dungeonManager.dungeonLevel++;
                fightManager.LoadScene(1);
            }
            else
            {
                randomCharacters();
                fightManager.wave++;
                fightManager.UpdateData();
            }
        }
    }