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); }
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(); }