共用方式為


LeaderboardWriter Class

Records leaderboard data for players in a NetworkSession.

Data can be written at any time during gameplay, but is only flushed to the server when the host calls EndGame. Data may be written for both local and remote gamers by using the following rules:

  • Ranked sessions can write to both arbitrated and nonarbitrated leaderboards.
  • Other session types can only write to nonarbitrated leaderboards.
  • Arbitrated statistics should be written by all machines for all gamers.
  • Nonarbitrated statistics should only be written by their local machine.
  • In ranked sessions, all machines should report TrueSkill for all gamers.
  • In other session types, only the host should report TrueSkill data.

Leaderboards can only be written while in a NetworkSession, and while in the gameplay state rather than in the lobby. To write scores from a single player game, create a session using NetworkSessionType.LocalWithLeaderboards.

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

Syntax

public sealed class LeaderboardWriter

Remarks

Warning

This class and all related methods and properties only retrieve a calculated result for titles approved to access Xbox LIVE Services through the Xbox LIVE Registered Developer Program. For Xbox LIVE Indie games, the properties in this class will not return a calculated result, and related methods will report a NotSupportedException.

See Also

Reference

LeaderboardWriter Members
Microsoft.Xna.Framework.GamerServices Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP