C# Класс Indiefreaks.Xna.Sessions.SessionManager

The SessionManager provides SunBurn with a Manager to identify Players, create, update and maintain a Session
Наследование: ISessionManager
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
LocalPlayers IdentifiedPlayer>.Dictionary

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
GetNextFreeLogicalPlayerIndex ( ) : LogicalPlayerIndex
SessionManager ( IManagerServiceProvider sceneInterface ) : System

Creates a new instance

Описание методов

ApplyPreferences() публичный Метод

Use to apply user quality and performance preferences to the resources managed by this object.
public ApplyPreferences ( ISystemPreferences preferences ) : void
preferences ISystemPreferences
Результат void

BeginPlayerIdentification() публичный Метод

Starts listening to players A button pressed to identify them
public BeginPlayerIdentification ( ) : void
Результат void

Clear() публичный Метод

Removes resources managed by this object. Commonly used while clearing the scene.
public Clear ( ) : void
Результат void

CloseSession() публичный Метод

public CloseSession ( ) : void
Результат void

CreateLanSession() публичный абстрактный Метод

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
Результат void

CreateSinglePlayerSession() публичный абстрактный Метод

Creates a Single Player Session
No network resources will be used
public abstract CreateSinglePlayerSession ( ) : void
Результат void

CreateSplitScreenSession() публичный абстрактный Метод

Creates a Split Screen Session
Not implemented yet
public abstract CreateSplitScreenSession ( ) : void
Результат void

CreateWanSession() публичный абстрактный Метод

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
Результат void

EndPlayerIdentification() публичный Метод

Closes the identification process
public EndPlayerIdentification ( ) : void
Результат void

FindSessions() публичный абстрактный Метод

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
Результат void

GetIdentifiedPlayer() публичный статический Метод

Returns the Identified player with the given logical player index
public static GetIdentifiedPlayer ( LogicalPlayerIndex logicalPlayerIndex ) : IdentifiedPlayer
logicalPlayerIndex LogicalPlayerIndex
Результат IdentifiedPlayer

GetNextFreeLogicalPlayerIndex() защищенный статический Метод

protected static GetNextFreeLogicalPlayerIndex ( ) : LogicalPlayerIndex
Результат LogicalPlayerIndex

IdentifyPlayer() публичный абстрактный Метод

Identifies a player
public abstract IdentifyPlayer ( PlayerInput playerInput ) : void
playerInput Indiefreaks.Xna.Input.PlayerInput The PlayerInput instance used by the player to identify
Результат void

JoinSession() публичный абстрактный Метод

Sends a Join query to the Session asynchronously
public abstract JoinSession ( AvailableSession availableSession ) : void
availableSession AvailableSession The Session we are trying to join
Результат void

OnPlayerLogin() публичный Метод

Raised when a Player is identified
public OnPlayerLogin ( IdentifiedPlayer identifiedPlayer ) : void
identifiedPlayer IdentifiedPlayer
Результат void

OnPlayerLogoff() публичный Метод

Raised when a Player logs off
public OnPlayerLogoff ( IdentifiedPlayer identifiedPlayer ) : void
identifiedPlayer IdentifiedPlayer
Результат void

OnSessionClosed() публичный Метод

public OnSessionClosed ( ) : void
Результат void

OnSessionCreated() публичный Метод

Raised when the Session is created
public OnSessionCreated ( ) : void
Результат void

OnSessionJoined() публичный Метод

Raised when the Session is joined
public OnSessionJoined ( ) : void
Результат void

OnSessionsFound() публичный Метод

Raised when the FindSessions query ends
public OnSessionsFound ( IList sessionsFound ) : void
sessionsFound IList
Результат void

SessionManager() защищенный Метод

Creates a new instance
protected SessionManager ( IManagerServiceProvider sceneInterface ) : System
sceneInterface IManagerServiceProvider
Результат System

Unload() публичный Метод

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
Результат void

Update() публичный Метод

Updates the object and its contained resources.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void

Описание свойств

LocalPlayers публичное статическое свойство

public static Dictionary LocalPlayers
Результат IdentifiedPlayer>.Dictionary