Esempio n. 1
0
        private void boardPanel1_Paint(object sender, PaintEventArgs e)
        {
            using (Graphics g = this.boardPanel1.CreateGraphics())
            {
                WallTile t = new WallTile(0, 0, true);

                Pen p = new Pen(t.TileColor, 2);

                SolidBrush brush = new SolidBrush(t.TileColor);

                g.FillRectangle(brush, 0, 0, Tile.TILE_SIZE, Tile.TILE_SIZE);
                g.DrawRectangle(p, t.DrawTile);

                p.Dispose();
            }
        }
Esempio n. 2
0
 private void CreateTile(ref Tile tile, string tileType, int x, int y, bool? stateBool)
 {
     if (tileType == "WT")
         tile = new WallTile(x, y, (bool)stateBool);
 }