示例#1
0
 public Map(Dungeon target, Random rng, List<Room> rooms)
 {
     this.rng = rng;
     this.target = target;
     this.brushes = new RoomBrushFactory ();
     this.hallBrush = brushes.createRoomBrush (rng);
     this.torchBrush = new LevelGen.TorchBrush ();
     this.Rooms = rooms;
     UnityEngine.Debug.Log (Rooms);
 }
 // Use this for initialization
 void Start()
 {
     d = new Dungeon ();
     var f = new RoomBrushFactory ();
     var rng = new System.Random (seed);
     Brush h = f.createRoomBrush (rng);
     d.Place (new Position(0, 0, 1), h);
     d.Place (new Position(1, 0, 0), h);
     d.Place (new Position(1, 1, 0), h);
     d.Place (new Position(1, 1, 1), h);
     d.Place (new Position(0, 1, 0), h);
     d.Place (new Position(0, 1, 1), h);
     d.RenderAll ();
 }
        // Use this for initialization
        void Start()
        {
            d = new Dungeon();
            var   f   = new RoomBrushFactory();
            var   rng = new System.Random(seed);
            Brush h   = f.createRoomBrush(rng);

            d.Place(new Position(0, 0, 1), h);
            d.Place(new Position(1, 0, 0), h);
            d.Place(new Position(1, 1, 0), h);
            d.Place(new Position(1, 1, 1), h);
            d.Place(new Position(0, 1, 0), h);
            d.Place(new Position(0, 1, 1), h);
            d.RenderAll();
        }