C# 클래스 Fusion.Engine.Client.GameClient

상속: Fusion.Engine.Common.GameModule
파일 보기 프로젝트 열기: demiurghg/FusionEngine 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Guid System.Guid

공개 메소드들

메소드 설명
FeedNotification ( string message ) : void

Feed notification from server.

FeedSnapshot ( GameTime serverTime, byte snapshot, uint ackCommandID ) : void

Feed server snapshot to client. Called when fresh snapshot arrived. Not all snapshot could reach client.

FinalizeLoad ( GameLoader loader ) : void

Called when GameLoader finished loading. This method lets client to complete loading process in main thread. Add mesh instances, sounds, setup sky, hdr etc in this method.

GameClient ( Game game ) : System

Initializes a new instance of this class.

LoadContent ( string serverInfo ) : GameLoader

Called when connection request accepted by server. Method returns GameLoader that could load all content according server info.

NotifyServer ( string message ) : void

Sends server string message. This method may be used for chat or remote server control throw Shell.

UnloadContent ( ) : void

Called when client disconnected, dropped, kicked or timeouted. Client must purge all level-associated content. In most cases you need just to call Content.Unload().

Update ( GameTime gameTime, uint sentCommandID ) : byte[]

Called when the game has determined that client-side logic needs to be processed.

UserInfo ( ) : string

Gets user information. Called when client-server game logic has determined that server needs user information.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases all resources used by the GameClient class.

비공개 메소드들

메소드 설명
ConnectInternal ( string host, int port ) : void

Request connection. Result depends on current client state.

DisconnectInternal ( string message ) : void

Request diconnect. Result depends on current client state.

DispatchDataIM ( NetIncomingMessage msg ) : void

DispatchIM ( Lidgren.Network.NetClient client ) : void

DispatchSnapshot ( NetIncomingMessage msg ) : void

DispatchStatusChange ( NetIncomingMessage msg ) : void

InitInternal ( ) : void

Inits internal stuff

InitiateLoadLevel ( string serverInfo ) : void
NotifyInternal ( string message ) : void

SendDiscoveryRequest ( ) : void

SendUserCommand ( Lidgren.Network.NetClient client, uint recvSnapshotFrame, uint cmdCounter, byte userCmd ) : void

SetState ( State newState ) : void

Sets state

UpdateInternal ( GameTime gameTime ) : void

Updates client.

Wait ( ) : void

Wait for client completion.

메소드 상세

Dispose() 보호된 메소드

Releases all resources used by the GameClient class.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

FeedNotification() 공개 추상적인 메소드

Feed notification from server.
public abstract FeedNotification ( string message ) : void
message string Message from server
리턴 void

FeedSnapshot() 공개 추상적인 메소드

Feed server snapshot to client. Called when fresh snapshot arrived. Not all snapshot could reach client.
public abstract FeedSnapshot ( GameTime serverTime, byte snapshot, uint ackCommandID ) : void
serverTime Fusion.Engine.Common.GameTime Server time includes number of server frames, total server time and elapsed time since last server frame. /// Snapshot data stream.
snapshot byte
ackCommandID uint Acknoledged (e.g. received and responsed) command ID. Zero value means first snapshot.
리턴 void

FinalizeLoad() 공개 추상적인 메소드

Called when GameLoader finished loading. This method lets client to complete loading process in main thread. Add mesh instances, sounds, setup sky, hdr etc in this method.
public abstract FinalizeLoad ( GameLoader loader ) : void
loader GameLoader
리턴 void

GameClient() 공개 메소드

Initializes a new instance of this class.
public GameClient ( Game game ) : System
game Game
리턴 System

LoadContent() 공개 추상적인 메소드

Called when connection request accepted by server. Method returns GameLoader that could load all content according server info.
public abstract LoadContent ( string serverInfo ) : GameLoader
serverInfo string
리턴 GameLoader

NotifyServer() 공개 메소드

Sends server string message. This method may be used for chat or remote server control throw Shell.
public NotifyServer ( string message ) : void
message string
리턴 void

UnloadContent() 공개 추상적인 메소드

Called when client disconnected, dropped, kicked or timeouted. Client must purge all level-associated content. In most cases you need just to call Content.Unload().
public abstract UnloadContent ( ) : void
리턴 void

Update() 공개 추상적인 메소드

Called when the game has determined that client-side logic needs to be processed.
public abstract Update ( GameTime gameTime, uint sentCommandID ) : byte[]
gameTime Fusion.Engine.Common.GameTime Cliemt-side game time.
sentCommandID uint Command's ID that are going to be sent.
리턴 byte[]

UserInfo() 공개 추상적인 메소드

Gets user information. Called when client-server game logic has determined that server needs user information.
public abstract UserInfo ( ) : string
리턴 string

프로퍼티 상세

Guid 공개적으로 프로퍼티

public Guid,System Guid
리턴 System.Guid