Ejemplo n.º 1
0
 public void BuySkeletonWarrior()
 {
     if (health.GetHP() > warriorCost + 1)
     {
         // Instanciate Knight
         SpawnOnClick(SkeletonWarrior);
         health.TakeDamage(warriorCost);
     }
 }
Ejemplo n.º 2
0
    private IEnumerator GameLoop()
    {
        if (waveCount == 0)
        {
            yield return(StartCoroutine(Picking()));
        }
        SpawnWave(waveCount);
        waveCount++;
        yield return(StartCoroutine(Fighting()));

        if (necroMancer.GetHP() >= 0)
        {
            StartCoroutine(GameLoop());
        }
        else
        {
            EndGame();
        }
    }