Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following tables list the members exposed by the Game type.
Public Constructors
Name | Description | |
---|---|---|
![]() |
Game | Initializes a new instance of this class, which provides basic graphics device initialization, game logic, rendering code, and a game loop. |
Public Properties
Name | Description | |
---|---|---|
![]() |
Components | Gets the collection of GameComponents owned by the game. |
![]() |
Content | Gets or sets the current ContentManager. |
![]() |
GraphicsDevice | Gets the current GraphicsDevice. |
![]() |
InactiveSleepTime | Gets or sets the time to sleep when the game is inactive. |
![]() |
IsActive | Indicates whether the game is currently the active application. |
![]() |
IsFixedTimeStep | Gets or sets a value indicating whether to use fixed time steps. |
![]() |
IsMouseVisible | Gets or sets a value indicating whether the mouse cursor should be visible. |
![]() |
LaunchParameters | Gets the start up parameters in LaunchParameters. |
![]() |
Services | Gets the GameServiceContainer holding all the service providers attached to the Game. |
![]() |
TargetElapsedTime | Gets or sets the target time between calls to Update when IsFixedTimeStep is true. |
![]() |
Window | Gets the underlying operating system window. |
Public Methods
Name | Description | |
---|---|---|
![]() |
Dispose | Overloaded. Immediately releases the unmanaged resources used by this object. |
![]() |
Equals | (Inherited from Object.) |
![]() |
Exit | Exits the game. |
![]() |
GetHashCode | (Inherited from Object.) |
![]() |
GetType | (Inherited from Object.) |
![]() |
ResetElapsedTime | Resets the elapsed time counter. |
![]() |
Run | Call this method to initialize the game, begin running the game loop, and start processing events for the game. |
![]() |
RunOneFrame | Run the game through what would happen in a single tick of the game clock; this method is designed for debugging only. |
![]() |
SuppressDraw | Prevents calls to Draw until the next Update. |
![]() |
Tick | Updates the game's clock and calls Update and Draw. |
![]() |
ToString | (Inherited from Object.) |
Protected Methods
Name | Description | |
---|---|---|
![]() |
BeginDraw | Starts the drawing of a frame. This method is followed by calls to Draw and EndDraw. |
![]() |
BeginRun | Called after all components are initialized but before the first update in the game loop. |
![]() |
Draw | Called when the game determines it is time to draw a frame. |
![]() |
EndDraw | Ends the drawing of a frame. This method is preceeded by calls to Draw and BeginDraw. |
![]() |
EndRun | Called after the game loop has stopped running before exiting. |
![]() |
Finalize | Allows a Game to attempt to free resources and perform other cleanup operations before garbage collection reclaims the Game. |
![]() |
Initialize | Called after the Game and GraphicsDevice are created, but before LoadContent. |
![]() |
LoadContent | Called when graphics resources need to be loaded. |
![]() |
MemberwiseClone | (Inherited from Object.) |
![]() |
OnActivated | Raises the Activated event. Override this method to add code to handle when the game gains focus. |
![]() |
OnDeactivated | Raises the Deactivated event. Override this method to add code to handle when the game loses focus. |
![]() |
OnExiting | Raises an Exiting event. Override this method to add code to handle when the game is exiting. |
![]() |
ShowMissingRequirementMessage | This is used to display an error message if there is no suitable graphics device or sound card. |
![]() |
UnloadContent | Called when graphics resources need to be unloaded. Override this method to unload any game-specific graphics resources. |
![]() |
Update | Called when the game has determined that game logic needs to be processed. |
Public Events
Name | Description | |
---|---|---|
![]() |
Activated | Raised when the game gains focus. |
![]() |
Deactivated | Raised when the game loses focus. |
![]() |
Disposed | Raised when the game is being disposed. |
![]() |
Exiting | Raised when the game is exiting. |