Beispiel #1
0
        /// <summary>
        /// Checks what color the top-left corner of tile x,y should be,
        /// and draws it at point px, py on the provided graphics object.
        /// </summary>
        private void DrawTopLeftPointFor(DungeonTiles tiles, int x, int y, int px, int py, Graphics g)
        {
            bool useWallColor = tiles.WallExists(x, y, Tile.MoveType.Open_NORTH) ||
                                tiles.WallExists(x, y, Tile.MoveType.Open_WEST) ||
                                tiles.WallExists(x - 1, y, Tile.MoveType.Open_NORTH) ||
                                tiles.WallExists(x, y - 1, Tile.MoveType.Open_WEST);

            Brush cornerBrush = useWallColor ? this.WallBorder_Brush : this.OpenBorder_Brush;

            g.FillRectangle(cornerBrush, px, py, 1, 1);
        }