예제 #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);
        }