C# 클래스 Indiefreaks.Xna.Sessions.SessionManager

The SessionManager provides SunBurn with a Manager to identify Players, create, update and maintain a Session
상속: ISessionManager
파일 보기 프로젝트 열기: Indiefreaks/igf

공개 프로퍼티들

프로퍼티 타입 설명
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