Esempio n. 1
0
    private IEnumerator UpdatePath(PathTarget pathTarget)
    {
        while (true)
        {
            if (pathTarget != null)
            {
                PathfindingManager.getInstance().RequestPath(transform.position, pathTarget.GetTarget(), GameManager.instance.GetCurrentGrid(), OnPathFound);
            }

            yield return(new WaitForSeconds(0.25f));
        }
    }