예제 #1
0
    // Step Way 1
    private IEnumerator DelayedGenerateBiomes()
    {
        myBiomes = new Biome[myWorldSideNumber * myWorldSideNumber];
        int x = 0;
        int y = 0;

        for (int i = 0; i < myBiomes.Length; i++)
        {
            myBiomes[i] = Instantiate(myBiomePrefab, transform);
            myBiomes[i].transform.localPosition = new Vector3(x * myBiomeSideSize * myRoomSideSize, y * myBiomeSideSize * myRoomSideSize, 0);
            myBiomes[i].Init(x, y, 0);
            DEBUGCANVAS.HighlightMap(x, y);
            x++;
            if (x >= myWorldSideNumber)
            {
                x = 0;
                y++;
            }
            yield return(new WaitForSeconds(STEPTIME));
        }

        StartCoroutine("DelayedGenerateBiomesRooms");
    }