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. |
![]() |
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. |
![]() |
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.) |
![]() |
ReferenceEquals | (Inherited from Object.) |
![]() |
Run | Call this method to initialize the game, begin running the game loop, and start processing events for the game. |
![]() |
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. Override this method with game-specific rendering code. |
![]() |
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 LoadGraphicsContent. |
![]() |
LoadGraphicsContent | Called when graphics resources need to be loaded. Override this method to load any game-specific graphics resources. |
![]() |
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. |
![]() |
UnloadGraphicsContent | Called when graphics resources need to be unloaded. Override this method to unload any game-specifc graphics resources. |
![]() |
Update | Called when the game has determined that game logic needs to be processed. Override this method with game-specific logic. |
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. |