C# Class Indiefreaks.Xna.Sessions.SessionManager

The SessionManager provides SunBurn with a Manager to identify Players, create, update and maintain a Session
Inheritance: ISessionManager
Afficher le fichier Open project: Indiefreaks/igf

Méthodes publiques

Свойство Type Description
LocalPlayers IdentifiedPlayer>.Dictionary

Méthodes publiques

Méthode Description
ApplyPreferences ( ISystemPreferences preferences ) : void

Use to apply user quality and performance preferences to the resources managed by this object.

BeginPlayerIdentification ( ) : void

Starts listening to players A button pressed to identify them

Clear ( ) : void

Removes resources managed by this object. Commonly used while clearing the scene.

CloseSession ( ) : void
CreateLanSession ( int maxPlayers, SessionProperties sessionProperties ) : void

Creates a local area network session

it doesn't yet support multiple local players

CreateSinglePlayerSession ( ) : void

Creates a Single Player Session

No network resources will be used

CreateSplitScreenSession ( ) : void

Creates a Split Screen Session

Not implemented yet

CreateWanSession ( int maxPlayers, SessionProperties sessionProperties ) : void

Creates a wide area network session

it doesn't yet support multiple local players

EndPlayerIdentification ( ) : void

Closes the identification process

FindSessions ( SessionType sessionType, int maxLocalPlayers, SessionProperties sessionProperties ) : void

Sends a Find query on the network interface to look for AvailableSession instances asynchrnously

GetIdentifiedPlayer ( LogicalPlayerIndex logicalPlayerIndex ) : IdentifiedPlayer

Returns the Identified player with the given logical player index

IdentifyPlayer ( PlayerInput playerInput ) : void

Identifies a player

JoinSession ( AvailableSession availableSession ) : void

Sends a Join query to the Session asynchronously

OnPlayerLogin ( IdentifiedPlayer identifiedPlayer ) : void

Raised when a Player is identified

OnPlayerLogoff ( IdentifiedPlayer identifiedPlayer ) : void

Raised when a Player logs off

OnSessionClosed ( ) : void
OnSessionCreated ( ) : void

Raised when the Session is created

OnSessionJoined ( ) : void

Raised when the Session is joined

OnSessionsFound ( IList sessionsFound ) : void

Raised when the FindSessions query ends

Unload ( ) : void

Disposes any graphics resource used internally by this object, and removes scene resources managed by this object. Commonly used during Game.UnloadContent.

Update ( GameTime gameTime ) : void

Updates the object and its contained resources.

Méthodes protégées

Méthode Description
GetNextFreeLogicalPlayerIndex ( ) : LogicalPlayerIndex
SessionManager ( IManagerServiceProvider sceneInterface ) : System

Creates a new instance

Method Details

ApplyPreferences() public méthode

Use to apply user quality and performance preferences to the resources managed by this object.
public ApplyPreferences ( ISystemPreferences preferences ) : void
preferences ISystemPreferences
Résultat void

BeginPlayerIdentification() public méthode

Starts listening to players A button pressed to identify them
public BeginPlayerIdentification ( ) : void
Résultat void

Clear() public méthode

Removes resources managed by this object. Commonly used while clearing the scene.
public Clear ( ) : void
Résultat void

CloseSession() public méthode

public CloseSession ( ) : void
Résultat void

CreateLanSession() public abstract méthode

Creates a local area network session
it doesn't yet support multiple local players
public abstract CreateLanSession ( int maxPlayers, SessionProperties sessionProperties ) : void
maxPlayers int The total maximum players for this session
sessionProperties SessionProperties The SessionProperties that will be used to find this session on the network. Can be null
Résultat void

CreateSinglePlayerSession() public abstract méthode

Creates a Single Player Session
No network resources will be used
public abstract CreateSinglePlayerSession ( ) : void
Résultat void

CreateSplitScreenSession() public abstract méthode

Creates a Split Screen Session
Not implemented yet
public abstract CreateSplitScreenSession ( ) : void
Résultat void

CreateWanSession() public abstract méthode

Creates a wide area network session
it doesn't yet support multiple local players
public abstract CreateWanSession ( int maxPlayers, SessionProperties sessionProperties ) : void
maxPlayers int The total maximum players for this session
sessionProperties SessionProperties The SessionProperties that will be used to find this session on the network. Can be null
Résultat void

EndPlayerIdentification() public méthode

Closes the identification process
public EndPlayerIdentification ( ) : void
Résultat void

FindSessions() public abstract méthode

Sends a Find query on the network interface to look for AvailableSession instances asynchrnously
public abstract FindSessions ( SessionType sessionType, int maxLocalPlayers, SessionProperties sessionProperties ) : void
sessionType SessionType The SessionType we're looking for
maxLocalPlayers int The Maximum local players that can be added to the session used to filter sessions that have a limited number of opened public slots
sessionProperties SessionProperties The SessionProperties that will be used to filter query results. Can be null
Résultat void

GetIdentifiedPlayer() public static méthode

Returns the Identified player with the given logical player index
public static GetIdentifiedPlayer ( LogicalPlayerIndex logicalPlayerIndex ) : IdentifiedPlayer
logicalPlayerIndex LogicalPlayerIndex
Résultat IdentifiedPlayer

GetNextFreeLogicalPlayerIndex() protected static méthode

protected static GetNextFreeLogicalPlayerIndex ( ) : LogicalPlayerIndex
Résultat LogicalPlayerIndex

IdentifyPlayer() public abstract méthode

Identifies a player
public abstract IdentifyPlayer ( PlayerInput playerInput ) : void
playerInput Indiefreaks.Xna.Input.PlayerInput The PlayerInput instance used by the player to identify
Résultat void

JoinSession() public abstract méthode

Sends a Join query to the Session asynchronously
public abstract JoinSession ( AvailableSession availableSession ) : void
availableSession AvailableSession The Session we are trying to join
Résultat void

OnPlayerLogin() public méthode

Raised when a Player is identified
public OnPlayerLogin ( IdentifiedPlayer identifiedPlayer ) : void
identifiedPlayer IdentifiedPlayer
Résultat void

OnPlayerLogoff() public méthode

Raised when a Player logs off
public OnPlayerLogoff ( IdentifiedPlayer identifiedPlayer ) : void
identifiedPlayer IdentifiedPlayer
Résultat void

OnSessionClosed() public méthode

public OnSessionClosed ( ) : void
Résultat void

OnSessionCreated() public méthode

Raised when the Session is created
public OnSessionCreated ( ) : void
Résultat void

OnSessionJoined() public méthode

Raised when the Session is joined
public OnSessionJoined ( ) : void
Résultat void

OnSessionsFound() public méthode

Raised when the FindSessions query ends
public OnSessionsFound ( IList sessionsFound ) : void
sessionsFound IList
Résultat void

SessionManager() protected méthode

Creates a new instance
protected SessionManager ( IManagerServiceProvider sceneInterface ) : System
sceneInterface IManagerServiceProvider
Résultat System

Unload() public méthode

Disposes any graphics resource used internally by this object, and removes scene resources managed by this object. Commonly used during Game.UnloadContent.
public Unload ( ) : void
Résultat void

Update() public méthode

Updates the object and its contained resources.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

Property Details

LocalPlayers public_oe static_oe property

public static Dictionary LocalPlayers
Résultat IdentifiedPlayer>.Dictionary