- XNA 4.0 Game Development by Example Beginner's Guide(Visual Basic Edition)
- Kurt Jaegers
- 202字
- 2021-08-20 15:50:34
Time for action – customizing the Initialize() method
What just happened?
By default, the mouse is not visible inside the XNA game window. Setting the IsMouseVisible
property of the running instance of the Game1
class enables the mouse cursor in Windows.
Tip
Input types on other platforms
The Xbox and Windows Phone do not have mice, so what happens when the code to enable the mouse runs on these platforms? Nothing! If a platform is not equipped to support a specific type of input, the request just returns the default values when no input is being received. It is also safe to ask other platforms about their non-existent keyboards and check the state of a gamepad on a Windows PC without one attached.
The LoadContent() method
Part of the responsibility of the base Initialize()
method is to call LoadContent()
when the normal initialization has completed. The method is used to read in any graphical and audio resources your game will need. The default LoadContent()
method is also where the spriteBatch
object gets initialized. You will use the spriteBatch
instance to draw objects to the screen during execution of the Draw()
method.
- 大規(guī)模數(shù)據(jù)分析和建模:基于Spark與R
- Access 2016數(shù)據(jù)庫教程(微課版·第2版)
- ETL數(shù)據(jù)整合與處理(Kettle)
- 計算機(jī)信息技術(shù)基礎(chǔ)實驗與習(xí)題
- Learning Spring Boot
- 大數(shù)據(jù)營銷:如何讓營銷更具吸引力
- 數(shù)據(jù)驅(qū)動設(shè)計:A/B測試提升用戶體驗
- Oracle PL/SQL實例精解(原書第5版)
- MySQL DBA修煉之道
- Visual Studio 2013 and .NET 4.5 Expert Cookbook
- 企業(yè)主數(shù)據(jù)管理實務(wù)
- Python 3爬蟲、數(shù)據(jù)清洗與可視化實戰(zhàn)
- 標(biāo)簽類目體系:面向業(yè)務(wù)的數(shù)據(jù)資產(chǎn)設(shè)計方法論
- 實用預(yù)測分析
- Configuration Management with Chef-Solo