Export (0) Print
Expand All

Game Members

The following tables list the members exposed by the Game type.

NameDescription
Public MethodGameInitializes a new instance of this class, which provides basic graphics device initialization, game logic, rendering code, and a game loop.

NameDescription
Public PropertyComponentsGets the collection of GameComponents owned by the game.
Public PropertyContentGets or sets the current ContentManager.
Public PropertyGraphicsDevice Gets the current GraphicsDevice.
Public PropertyInactiveSleepTimeGets or sets the time to sleep when the game is inactive.
Public PropertyIsActiveIndicates whether the game is currently the active application.
Public PropertyIsFixedTimeStepGets or sets a value indicating whether to use fixed time steps.
Public PropertyIsMouseVisible Gets or sets a value indicating whether the mouse cursor should be visible.
Public PropertyLaunchParametersGets the start up parameters in LaunchParameters.
Public PropertyServicesGets the GameServiceContainer holding all the service providers attached to the Game.
Public PropertyTargetElapsedTimeGets or sets the target time between calls to Update when IsFixedTimeStep is true.
Public PropertyWindowGets the underlying operating system window.

NameDescription
Public MethodDisposeOverloaded. Immediately releases the unmanaged resources used by this object.
Public MethodEquals(Inherited from Object.)
Public MethodExitExits the game.
Public MethodGetHashCode(Inherited from Object.)
Public MethodGetType(Inherited from Object.)
Public MethodResetElapsedTimeResets the elapsed time counter.
Public MethodRun Call this method to initialize the game, begin running the game loop, and start processing events for the game.
Public MethodRunOneFrameRun the game through what would happen in a single tick of the game clock; this method is designed for debugging only.
Public MethodSuppressDrawPrevents calls to Draw until the next Update.
Public MethodTickUpdates the game's clock and calls Update and Draw.
Public MethodToString(Inherited from Object.)

NameDescription
Protected MethodBeginDraw Starts the drawing of a frame. This method is followed by calls to Draw and EndDraw.
Protected MethodBeginRun Called after all components are initialized but before the first update in the game loop.
Protected MethodDrawCalled when the game determines it is time to draw a frame.
Protected MethodEndDraw Ends the drawing of a frame. This method is preceeded by calls to Draw and BeginDraw.
Protected MethodEndRunCalled after the game loop has stopped running before exiting.
Protected MethodFinalize Allows a Game to attempt to free resources and perform other cleanup operations before garbage collection reclaims the Game.
Protected MethodInitialize Called after the Game and GraphicsDevice are created, but before LoadContent.
Protected MethodLoadContentCalled when graphics resources need to be loaded.
Protected MethodMemberwiseClone(Inherited from Object.)
Protected MethodOnActivatedRaises the Activated event. Override this method to add code to handle when the game gains focus.
Protected MethodOnDeactivatedRaises the Deactivated event. Override this method to add code to handle when the game loses focus.
Protected MethodOnExitingRaises an Exiting event. Override this method to add code to handle when the game is exiting.
Protected MethodShowMissingRequirementMessageThis is used to display an error message if there is no suitable graphics device or sound card.
Protected MethodUnloadContentCalled when graphics resources need to be unloaded. Override this method to unload any game-specific graphics resources.
Protected MethodUpdateCalled when the game has determined that game logic needs to be processed.

NameDescription
Public EventActivatedRaised when the game gains focus.
Public EventDeactivatedRaised when the game loses focus.
Public EventDisposedRaised when the game is being disposed.
Public EventExitingRaised when the game is exiting.

Community Additions

ADD
Show:
© 2014 Microsoft