C# Class FBServer.Host.GameServer

Datei anzeigen Open project: Noxalus/Final-Bomber

Public Properties

Property Type Description
Clients ClientCollection
SelectedMapName string

Public Methods

Method Description
EndServer ( string reason ) : void
SendAvailableMaps ( Client client ) : void
SendBombExploded ( Bomb bomb ) : void
SendClientId ( Client client ) : void

Sends the id generate by the server to the corresponding client

SendClientsToNew ( Client client ) : void
SendEnd ( Client client ) : void
SendKillPlayer ( Client victimClient, Client killerClient ) : void
SendNewClientInfo ( Client client ) : void
SendPings ( ) : void
SendPlayerPlacingBomb ( Client client, Point position ) : void
SendPlayerPosition ( Client client, bool notDir, bool exceptHim ) : void
SendPowerUpDrop ( PowerUp powerUp ) : void
SendPowerUpPickUp ( Client client, PowerUp powerUp ) : void
SendRemovePlayer ( Player removedPlayer ) : void
SendRoundEnd ( Client client ) : void
SendSelectedMap ( Client client ) : void
SendStartGame ( bool gameInProgress ) : void
SendSuddenDeath ( ) : void
SendSuicidePlayer ( Client suicidalClient ) : void
StartServer ( ) : void

Start the server

Update ( ) : void

Check for new messages from clients

Private Methods

Method Description
CheckNewClientMessages ( ) : void
DataProcessing ( NetIncomingMessage message, Client &client ) : void
GameServer ( ) : System
GetClientInfo ( Client client ) : NetOutgoingMessage
OnBombPlacing ( Client sender ) : void
OnConnectedClient ( Client sender, EventArgs e ) : void

Event raised when a client is connecting

OnDisconnectedClient ( Client sender, EventArgs e ) : void

Event raised when a client is disconnecting

ReceiveBombPlacing ( Client client ) : void
ReceiveCredentials ( Client client, string username, string password ) : void
ReceiveHasMap ( Client client ) : void
ReceiveMapSelection ( Client client, string md5 ) : void
ReceiveMovePlayer ( Client client, LookDirection movement, double ping = null ) : void
ReceiveNeedMap ( Client client ) : void
ReceiveReady ( Client client, bool ready ) : void
ReceiveWantToStartGame ( ) : void
SendCurrentMap ( Client client ) : void
SendGameWillStart ( ) : void
SendIsReady ( Client client, bool ready ) : void
SendPlayersPosition ( bool exceptHim ) : void

Method Details

EndServer() public method

public EndServer ( string reason ) : void
reason string
return void

SendAvailableMaps() public method

public SendAvailableMaps ( Client client ) : void
client Client
return void

SendBombExploded() public method

public SendBombExploded ( Bomb bomb ) : void
bomb Bomb
return void

SendClientId() public method

Sends the id generate by the server to the corresponding client
public SendClientId ( Client client ) : void
client Client The corresponding client
return void

SendClientsToNew() public method

public SendClientsToNew ( Client client ) : void
client Client
return void

SendEnd() public method

public SendEnd ( Client client ) : void
client Client
return void

SendKillPlayer() public method

public SendKillPlayer ( Client victimClient, Client killerClient ) : void
victimClient Client
killerClient Client
return void

SendNewClientInfo() public method

public SendNewClientInfo ( Client client ) : void
client Client
return void

SendPings() public method

public SendPings ( ) : void
return void

SendPlayerPlacingBomb() public method

public SendPlayerPlacingBomb ( Client client, Point position ) : void
client Client
position Point
return void

SendPlayerPosition() public method

public SendPlayerPosition ( Client client, bool notDir, bool exceptHim ) : void
client Client
notDir bool
exceptHim bool
return void

SendPowerUpDrop() public method

public SendPowerUpDrop ( PowerUp powerUp ) : void
powerUp PowerUp
return void

SendPowerUpPickUp() public method

public SendPowerUpPickUp ( Client client, PowerUp powerUp ) : void
client Client
powerUp PowerUp
return void

SendRemovePlayer() public method

public SendRemovePlayer ( Player removedPlayer ) : void
removedPlayer Player
return void

SendRoundEnd() public method

public SendRoundEnd ( Client client ) : void
client Client
return void

SendSelectedMap() public method

public SendSelectedMap ( Client client ) : void
client Client
return void

SendStartGame() public method

public SendStartGame ( bool gameInProgress ) : void
gameInProgress bool
return void

SendSuddenDeath() public method

public SendSuddenDeath ( ) : void
return void

SendSuicidePlayer() public method

public SendSuicidePlayer ( Client suicidalClient ) : void
suicidalClient Client
return void

StartServer() public method

Start the server
public StartServer ( ) : void
return void

Update() public method

Check for new messages from clients
public Update ( ) : void
return void

Property Details

Clients public_oe property

public ClientCollection Clients
return ClientCollection

SelectedMapName public_oe property

public string SelectedMapName
return string