Example #1
0
        public Chunk GenerateChunk(long seed)
        {
            Chunk c = new Chunk();
            Random r = new Random((int)seed);

            for (int x = 0; x < 4; x++)
            {
                for (int y = 0; y < 4; y++)
                {
                    c[x, y] = new DungeonTile(TileDatabase[r.Next(TileDatabase.Count)]);
                }
            }

            return c;
        }
Example #2
0
        public Chunk GenerateChunk(long seed)
        {
            Chunk c = new Chunk();
            Random r = new Random((int)seed);

            int templateIdx = r.Next(TEMPLATE_DB.GetLength(0));

            for (int x = 0; x < 4; x++)
            {
                for (int y = 0; y < 4; y++)
                {
                    c[x, y] = new DungeonTile(GetTileWithType(TEMPLATE_DB[templateIdx, x, y], r));
                }
            }

            return c;
        }
Example #3
0
 public DungeonTile(DungeonTile copy)
     : base(copy)
 {
     this._extent = copy._extent;
     this._type = copy._type;
 }