- XNA 4.0 Game Development by Example Beginner's Guide(Visual Basic Edition)
- Kurt Jaegers
- 154字
- 2021-08-20 15:50:40
Time for action – updating the Initialize() method
- Update the
Initialize()
method to include the following:Me.IsMouseVisible = True Me.graphics.PreferredBackBufferWidth = 800 Me.graphics.PreferredBackBufferHeight = 600 graphics.ApplyChanges()
- 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.
推薦閱讀
- 數據庫原理及應用教程(第4版)(微課版)
- Creating Dynamic UIs with Android Fragments(Second Edition)
- OracleDBA實戰攻略:運維管理、診斷優化、高可用與最佳實踐
- 大數據架構商業之路:從業務需求到技術方案
- 達夢數據庫運維實戰
- 大數據技術原理與應用:概念、存儲、處理、分析與應用
- 數據應用工程:方法論與實踐
- ORACLE 11g權威指南
- Nagios Core Administrators Cookbook
- Hive性能調優實戰
- SQL應用開發參考手冊
- 數據庫高效優化:架構、規范與SQL技巧
- 大數據:從海量到精準
- 元宇宙基石:Web3.0與分布式存儲
- Data Analysis with Python