示例#1
0
文件: Room.cs 项目: Windsdon/Dungen
        public override Tile[][] getTiles()
        {
            Tile[][] tiles = new Tile[bounds.h][];

            for (int i = 0; i < bounds.h; i++) {
                tiles[i] = new Tile[bounds.w];
                for (int j = 0; j < bounds.w; j++) {
                    if (i == 0 || j == 0 || j == bounds.w - 1 || i == bounds.h - 1) {
                        tiles[i][j] = new TileWall(bounds.x + j, bounds.y + i);
                    } else {
                        tiles[i][j] = new TileFloor(bounds.x + j, bounds.y + i);
                    }
                }
            }

            return tiles;
        }
示例#2
0
        public override Tile[][] getTiles()
        {
            Tile[][] tiles = new Tile[bounds.h][];

            for (int i = 0; i < bounds.h; i++)
            {
                tiles[i] = new Tile[bounds.w];
                for (int j = 0; j < bounds.w; j++)
                {
                    if (i == 0 || j == 0 || j == bounds.w - 1 || i == bounds.h - 1)
                    {
                        tiles[i][j] = new TileWall(bounds.x + j, bounds.y + i);
                    }
                    else
                    {
                        tiles[i][j] = new TileFloor(bounds.x + j, bounds.y + i);
                    }
                }
            }

            return(tiles);
        }