Exemplo n.º 1
0
    IEnumerator SpawnCheck()
    {
        if (isSpawn == false)
        {
            xStart = GetComponentInParent <Transform>().position.x - length;
            zStart = GetComponentInParent <Transform>().position.z + length;

            xEnd = GetComponentInParent <Transform>().position.x + length;
            zEnd = GetComponentInParent <Transform>().position.z - length;

            for (float i = zStart; i > zEnd; i -= 5)
            {
                for (float j = xStart; j < xEnd; j += 5)
                {
                    //Debug.Log(j + " : " + i);
                    tm.CallCheker(j, i);
                }
            }
            isSpawn = true;
        }
        yield return(null);
    }