Commonly used classes and structures
1. The Game Class
Namespace: Microsoft.Xna.Framework.Game
Initializes a new instance of this class, which provides basic graphics device initialization, game logic, rendering code, and a game loop.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.game_members.aspx
Namespace: Microsoft.Xna.Framework.Game
Initializes a new instance of this class, which provides basic graphics device initialization, game logic, rendering code, and a game loop.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.game_members.aspx
2. The GraphicsDeviceManger Class
Namespace: Microsoft.Xna.Framework.GraphicsDeviceManager
Creates a new GraphicsDeviceManager and registers it to handle the configuration and management of the graphics device for the specified Game.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphicsdevicemanager_members.aspx
Namespace: Microsoft.Xna.Framework.GraphicsDeviceManager
Creates a new GraphicsDeviceManager and registers it to handle the configuration and management of the graphics device for the specified Game.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphicsdevicemanager_members.aspx
3. The SpriteBatch Class
Namespace: Microsoft.Xna.Framework.Graphics.SpriteBatch
Initializes a new instance of the class, which enables a group of sprites to be drawn using the same settings.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.spritebatch_members.aspx
4.The Model Class
Namespace: Microsoft.Xna.Framework.Graphics.Model
Represents a 3D model composed of multiple ModelMesh objects which may be moved independently.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.model_members.aspx
5. The GameTime Class
Namespace: Microsoft.Xna.Framework.GameTime
Snapshot of the game timing state expressed in values that can be used by variable-step (real time) or fixed-step (game time) games.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.gametime_members.aspx
6.The GamePad Class
Namespace: Microsoft.Xna.Framework.Input.GamePad
Allows retrieval of user interaction with an Xbox 360 Controller and setting of controller vibration motors.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.input.gamepad_members.aspx
Namespace: Microsoft.Xna.Framework.Graphics.SpriteBatch
Initializes a new instance of the class, which enables a group of sprites to be drawn using the same settings.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.spritebatch_members.aspx
4.The Model Class
Namespace: Microsoft.Xna.Framework.Graphics.Model
Represents a 3D model composed of multiple ModelMesh objects which may be moved independently.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.model_members.aspx
5. The GameTime Class
Namespace: Microsoft.Xna.Framework.GameTime
Snapshot of the game timing state expressed in values that can be used by variable-step (real time) or fixed-step (game time) games.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.gametime_members.aspx
6.The GamePad Class
Namespace: Microsoft.Xna.Framework.Input.GamePad
Allows retrieval of user interaction with an Xbox 360 Controller and setting of controller vibration motors.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.input.gamepad_members.aspx
7.The Keyboard class
Namespace: Microsoft.Xna.Framework.Input.Keyboard
Allows retrieval of keystrokes from a keyboard input device.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.input.keyboard_members.aspx
8.The Mouse Class
Namespace: Microsoft.Xna.Framework.Input.Mouse
Allows retrieval of position and button clicks from a mouse input device.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.input.mouse_methods.aspx
9.The Vector3 Structure
Namespace: Microsoft.Xna.Framework.Vector3(struct)
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.vector3_methods.aspx
10.The Matrix Structure
Namespace: Microsoft.Xna.Framework.Matrix(struct)
Defines a matrix.
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.matrix_methods.aspx
11.The ModelMesh Class
Namespace: Microsoft.Xna.Framework.Graphics.ModelMesh
Represents a mesh that is part of a Model.
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.modelmesh_members.aspx
12. The BasicEffect Class
Namespace: Microsoft.Xna.Framework.Graphics.BasicEffect
Represents shader model 1.1 Effect that has optional support for vertex colors, texturing, and lighting.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.basiceffect_members.aspx
13.The MathHelper Class
Namespace: Microsoft.Xna.Framework.MathHelper
Contains commonly used precalculated values.
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.mathhelper_members.aspx
Namespace: Microsoft.Xna.Framework.Input.Keyboard
Allows retrieval of keystrokes from a keyboard input device.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.input.keyboard_members.aspx
8.The Mouse Class
Namespace: Microsoft.Xna.Framework.Input.Mouse
Allows retrieval of position and button clicks from a mouse input device.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.input.mouse_methods.aspx
9.The Vector3 Structure
Namespace: Microsoft.Xna.Framework.Vector3(struct)
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.vector3_methods.aspx
10.The Matrix Structure
Namespace: Microsoft.Xna.Framework.Matrix(struct)
Defines a matrix.
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.matrix_methods.aspx
11.The ModelMesh Class
Namespace: Microsoft.Xna.Framework.Graphics.ModelMesh
Represents a mesh that is part of a Model.
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.modelmesh_members.aspx
12. The BasicEffect Class
Namespace: Microsoft.Xna.Framework.Graphics.BasicEffect
Represents shader model 1.1 Effect that has optional support for vertex colors, texturing, and lighting.
Members
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.basiceffect_members.aspx
13.The MathHelper Class
Namespace: Microsoft.Xna.Framework.MathHelper
Contains commonly used precalculated values.
http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.mathhelper_members.aspx
Commonly used Methods in the Game Class
1. protected override void Initialize()
Allows the game to perform any initialization it needs to before starting to run.This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.
2.public Game1()
Constructor for the Game Class
2.public Game1()
Constructor for the Game Class
3. protected override void LoadContent()
LoadContent will be called once per game and is the place to load all of your content.
4. protected override void UnloadContent()
UnloadContent will be called once per game and is the place to unload all content.
5. protected override void Update(GameTime gameTime)
4. protected override void UnloadContent()
UnloadContent will be called once per game and is the place to unload all content.
5. protected override void Update(GameTime gameTime)
Allows the game to run logic such as updating the world,checking for collisions, gathering input, and playing audio.
6. protected override void Draw(GameTime gameTime)
6. protected override void Draw(GameTime gameTime)
This is called when the game should draw itself.
UML depiction of a simple Program written using these methods to load a and Manipulate a 3D content in windows in full screen mode
