예제 #1
0
 public void Run(DungeonGeneratorContext ctx)
 {
     foreach (var step in steps)
     {
         step.Grow(ctx);
     }
 }
예제 #2
0
        public void Grow(DungeonGeneratorContext ctx)
        {
            var i = 0;

            while (ctx.openDoors.Any() && bail < 1000)
            {
                bail++;
                var door = ctx.openDoors.GetRandomItem(ctx.rand);
                if (ctx.GrowDungeon(door, this.Rooms, 2))
                {
                    i++;
                }
            }
        }
예제 #3
0
        public void Grow(DungeonGeneratorContext ctx)
        {
            var i = 0;

            while (i < this.maxNumRooms && bail < 1000)
            {
                bail++;
                var door = ctx.openDoors.GetRandomItem(ctx.rand);
                if (ctx.GrowDungeon(door, this.Rooms, 2))
                {
                    i++;
                }
            }

            if (bail < 1000)
            {
                Debug.Log("Bail GrowRoomsPipelineStep");
            }
        }
예제 #4
0
 public void Grow(DungeonGeneratorContext ctx)
 {
     ctx.StartDungeon(this.Rooms);
 }