Ejemplo n.º 1
0
    private void GenerateDungeon()
    {
        dungeonBuilder.BuildDungeon((Fields)Random.Range(0, Enum.GetNames(typeof(Fields)).Length));
        while (!InspectDungeon())
        {
            dungeonBuilder.DeleteDungeon();
            dungeonBuilder.BuildDungeon((Fields)Random.Range(0, Enum.GetNames(typeof(Fields)).Length));
        }
        dungeonBuilder.CombineDungeon();

        playerController.SpawnPlayer(Vector3.zero);

        dungeonFiller.FillDungeon();

        GetComponent <FieldFactory>().DeleteAllFields();
    }