예제 #1
0
    private IEnumerator OrcDeath()
    {
        anim.SetBool("isDead", true);
        currentTile.GetComponent <Tile>().RemoveBadguy(gameObject);
        currentTile.GetComponent <TileIndicator>().isOccupied = false;
        yield return(new WaitForSeconds(deathWait));

        OrcPool.ReturnOrc(gameObject, orcType.name);
    }
예제 #2
0
    private IEnumerator SpawnOrcs()
    {
        yield return(new WaitForSeconds(initialWaitTime + 1));

        for (int i = 0; i < completeOrcArray.Count; i++)
        {
            OrcPool.GetOrc(completeOrcArray[i].name, spawnPoints[completeOrcLane[i]]);
            yield return(new WaitForSeconds(completeOrcTimer[i]));
        }

        OnLastOrcSent?.Invoke();
    }