官术网_书友最值得收藏!

Time for action – updating the Initialize() method

  1. Update the Initialize() method to include the following:
    Me.IsMouseVisible = True
    Me.graphics.PreferredBackBufferWidth = 800
    Me.graphics.PreferredBackBufferHeight = 600
    graphics.ApplyChanges()
  2. Update the LoadContent() method to include the following after three texture files have been loaded:
    _gameBoard = New GameBoard(playingPieces, EmptyPiece)

What just happened?

After making the mouse cursor visible, we set the size of the BackBuffer to 800x600 pixels. On Windows, this will size the game window to 800x600 pixels as well.

The constructor for the GameBoard class calls the ClearBoard() method, so each of the pieces on the _gameBoard instance will be set to Empty.

The Draw() method – the title screen

In the declarations section, we established two possible game states. The first (and default) state is GameStates.TitleScreen, indicating that the game should not be processing actual game play, but should instead be displaying the game's logo and waiting for the user to begin the game.

主站蜘蛛池模板: 凤城市| 册亨县| 和林格尔县| 田阳县| 内黄县| 乌拉特中旗| 历史| 汝南县| 枣阳市| 巴彦淖尔市| 温宿县| 成武县| 景宁| 黔西县| 临安市| 鹤山市| 福贡县| 新蔡县| 攀枝花市| 田阳县| 太康县| 佛冈县| 临澧县| 胶南市| 同心县| 新和县| 万宁市| 清河县| 达日县| 石家庄市| 大厂| 广昌县| 长沙县| 新乡市| 深圳市| 平利县| 嘉善县| 兴安县| 光山县| 大竹县| 禹州市|