C# Class FBServer.Host.GameServer

Afficher le fichier Open project: Noxalus/Final-Bomber

Méthodes publiques

Свойство Type Description
Clients ClientCollection
SelectedMapName string

Méthodes publiques

Méthode 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

Méthode 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 méthode

public EndServer ( string reason ) : void
reason string
Résultat void

SendAvailableMaps() public méthode

public SendAvailableMaps ( Client client ) : void
client Client
Résultat void

SendBombExploded() public méthode

public SendBombExploded ( Bomb bomb ) : void
bomb Bomb
Résultat void

SendClientId() public méthode

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

SendClientsToNew() public méthode

public SendClientsToNew ( Client client ) : void
client Client
Résultat void

SendEnd() public méthode

public SendEnd ( Client client ) : void
client Client
Résultat void

SendKillPlayer() public méthode

public SendKillPlayer ( Client victimClient, Client killerClient ) : void
victimClient Client
killerClient Client
Résultat void

SendNewClientInfo() public méthode

public SendNewClientInfo ( Client client ) : void
client Client
Résultat void

SendPings() public méthode

public SendPings ( ) : void
Résultat void

SendPlayerPlacingBomb() public méthode

public SendPlayerPlacingBomb ( Client client, Point position ) : void
client Client
position Point
Résultat void

SendPlayerPosition() public méthode

public SendPlayerPosition ( Client client, bool notDir, bool exceptHim ) : void
client Client
notDir bool
exceptHim bool
Résultat void

SendPowerUpDrop() public méthode

public SendPowerUpDrop ( PowerUp powerUp ) : void
powerUp PowerUp
Résultat void

SendPowerUpPickUp() public méthode

public SendPowerUpPickUp ( Client client, PowerUp powerUp ) : void
client Client
powerUp PowerUp
Résultat void

SendRemovePlayer() public méthode

public SendRemovePlayer ( Player removedPlayer ) : void
removedPlayer Player
Résultat void

SendRoundEnd() public méthode

public SendRoundEnd ( Client client ) : void
client Client
Résultat void

SendSelectedMap() public méthode

public SendSelectedMap ( Client client ) : void
client Client
Résultat void

SendStartGame() public méthode

public SendStartGame ( bool gameInProgress ) : void
gameInProgress bool
Résultat void

SendSuddenDeath() public méthode

public SendSuddenDeath ( ) : void
Résultat void

SendSuicidePlayer() public méthode

public SendSuicidePlayer ( Client suicidalClient ) : void
suicidalClient Client
Résultat void

StartServer() public méthode

Start the server
public StartServer ( ) : void
Résultat void

Update() public méthode

Check for new messages from clients
public Update ( ) : void
Résultat void

Property Details

Clients public_oe property

public ClientCollection Clients
Résultat ClientCollection

SelectedMapName public_oe property

public string SelectedMapName
Résultat string