Ejemplo n.º 1
0
    IEnumerator CreateDungeon()
    {
        GameObject loading = (GameObject)Instantiate(loadingScreen);

        yield return(StartCoroutine(rooms.CreateRooms()));

        yield return(StartCoroutine(corridors.CreateCorridors()));

        yield return(StartCoroutine(walls.CreateRoomWalls()));

        yield return(StartCoroutine(walls.CreateCorridorWalls()));

        yield return(StartCoroutine(playerAndMerchantsGenerator.CreatePlayer()));

        yield return(StartCoroutine(playerAndMerchantsGenerator.CreateTraders()));

        yield return(StartCoroutine(chests.CreateChest()));

        Pathfinder.Instance.CreateMap();

        SpawnPortal();
        CreateScroll();
        SpawnSafeZoneCampfire();
        yield return(StartCoroutine(enemiesGenerator.CreateEnemies()));

        Destroy(loading);
    }