C# 클래스 Indiefreaks.Xna.Sessions.Live.LiveSession

A Xbox Live enabled Session implementation
상속: Session
파일 보기 프로젝트 열기: Indiefreaks/igf 1 사용 예제들

공개 메소드들

메소드 설명
EndSession ( ) : void

Ends the Session and changes its SessionState from Playing to Ended

ExecuteCommandOnServer ( Command command ) : void

Asks the Session to send a remote command call on the session host

ExecuteServerCommandOnClients ( Command command ) : void

Asks the Session to send a remote command call on all session clients

ListenIncoming ( ) : void

Listens to all data received from the network interface

OnClosed ( ) : void

Closes the Session and changes its SessionState to Closed

StartSession ( ) : void

Starts the Session and changes its SessionState from Lobby to Playing

SynchronizeCommandOnClients ( Command command ) : void

Sends a request to clients to synchronize commands created on Server

SynchronizeSceneEntitiesOnClients ( ISceneEntity sceneEntity ) : void
Update ( GameTime gameTime ) : void

Update loop call

보호된 메소드들

메소드 설명
NotifyServerSynchronizationDoneOnClient ( ) : void

Notifies the server that the synchronization with the server is performed locally

비공개 메소드들

메소드 설명
ConvertToSendDataOptions ( DataTransferOptions dataTransferOptions ) : SendDataOptions

Converts DataTransferOptions to Xbox Live SendDataOptions

LiveSession ( Microsoft.Xna.Framework.Net.NetworkSession networkSession ) : System

Creates a new instance

OnLivePlayerJoined ( object sender, Microsoft.Xna.Framework.Net.GamerJoinedEventArgs e ) : void

Raised when a player joins the session

OnLivePlayerLeft ( object sender, Microsoft.Xna.Framework.Net.GamerLeftEventArgs e ) : void

Raised when a player leaves

OnLiveSessionEnded ( object sender, GameEndedEventArgs e ) : void
OnLiveSessionStarted ( object sender, GameStartedEventArgs e ) : void

Raised when the Session started

WriteNetworkValue ( Microsoft.Xna.Framework.Net.PacketWriter &packetWriter, object networkValue ) : void

Helper method to write the network value to the PacketWriter

메소드 상세

EndSession() 공개 메소드

Ends the Session and changes its SessionState from Playing to Ended
public EndSession ( ) : void
리턴 void

ExecuteCommandOnServer() 공개 메소드

Asks the Session to send a remote command call on the session host
public ExecuteCommandOnServer ( Command command ) : void
command Indiefreaks.Xna.Logic.Command The command that should be executed
리턴 void

ExecuteServerCommandOnClients() 공개 메소드

Asks the Session to send a remote command call on all session clients
public ExecuteServerCommandOnClients ( Command command ) : void
command Indiefreaks.Xna.Logic.Command The command that should be executed
리턴 void

ListenIncoming() 공개 메소드

Listens to all data received from the network interface
public ListenIncoming ( ) : void
리턴 void

NotifyServerSynchronizationDoneOnClient() 보호된 메소드

Notifies the server that the synchronization with the server is performed locally
protected NotifyServerSynchronizationDoneOnClient ( ) : void
리턴 void

OnClosed() 공개 메소드

Closes the Session and changes its SessionState to Closed
public OnClosed ( ) : void
리턴 void

StartSession() 공개 메소드

Starts the Session and changes its SessionState from Lobby to Playing
public StartSession ( ) : void
리턴 void

SynchronizeCommandOnClients() 공개 메소드

Sends a request to clients to synchronize commands created on Server
public SynchronizeCommandOnClients ( Command command ) : void
command Indiefreaks.Xna.Logic.Command
리턴 void

SynchronizeSceneEntitiesOnClients() 공개 메소드

public SynchronizeSceneEntitiesOnClients ( ISceneEntity sceneEntity ) : void
sceneEntity ISceneEntity
리턴 void

Update() 공개 메소드

Update loop call
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
리턴 void