Exemplo n.º 1
0
    IEnumerator GetBestTarget()
    {
        yield return(new WaitForSeconds(1.5f));

        while (true)
        {
            target = GetClosestEnemy();
            turretController.SetTarget(target.gameObject);
            yield return(new WaitForSeconds(3f));
        }
    }