Exemplo n.º 1
0
        public Board()
        {
            Texture2D gridSquares = ContentService.Instance.Textures["Empty"];

            grid = new Sprite2D[8, 8];
            for (int i = 0; i < 8; i++)
            {
                for (int j = 0; j < 8; j++)
                {
                    grid[i, j] = new Sprite2D(gridSquares, new Rectangle(j * Constants.TILESIZE, i * Constants.TILESIZE, Constants.TILESIZE, Constants.TILESIZE), Color.DarkGray);
                    if ((i + j) % 2 == 0)
                    {
                        grid[i, j].Color = Color.White;
                    }
                }
            }

            InitializePieces();
        }
Exemplo n.º 2
0
 public Button(Sprite2D sprite)
 {
     this.sprite = sprite;
 }
Exemplo n.º 3
0
 public OptionsButton(Sprite2D sprite) : base(sprite)
 {
 }