Bagikan melalui


GamerServicesComponent Constructor

Creates a new GamerServicesComponent.

Syntax

'Declaration
Public Sub New ( _
         game As Game _
)
public GamerServicesComponent (
         Game game
)
public:
GamerServicesComponent(
         Game game
)

Parameters

  • game
    Type: Game
    The game that will be associated with this component.

Exceptions

Exception type Condition
GamerServicesNotAvailableException
  • If the current game uses the XNA Framework Redistributable. This file does not include Games for Windows – LIVE functionality.
  • If another Games for Windows – LIVE title is running already.
ArgumentNullException serviceProvider is null.
InvalidOperationException The gamer services functionality is already initialized.

Remarks

Important

Games for Windows - LIVE is unavailable to finished games. This functionality is not included in the redistributable version of the XNA Framework. A game that attempts to use these components without XNA Game Studio installed will result in a GamerServicesNotAvailableException.

Requirements

Namespace: Microsoft.Xna.Framework.GamerServices

Assembly: Microsoft.Xna.Framework.GamerServices (in microsoft.xna.framework.gamerservices.dll)

See Also

Reference

GamerServicesComponent Class
GamerServicesComponent Members
Microsoft.Xna.Framework.GamerServices Namespace

Platforms

Windows Phone