Beispiel #1
0
 void BroadcastUserId(int id, NetworkMessageInfo info)
 {
     Debug.Log("Received user ID: " + info.sender.externalIP + " has id <" + id + ">");
     players[info.sender] = id;
     StrifeMasterServer.NotifyPlayerJoined(id);
     networkView.RPC("ReceivedId", info.sender);
 }
Beispiel #2
0
 void OnPlayerDisconnected(NetworkPlayer player)
 {
     StrifeMasterServer.NotifyPlayerLeft(players[player]);
     Network.RemoveRPCs(player);
     Network.RemoveRPCsInGroup(players[player]);
     Network.DestroyPlayerObjects(player);
 }
 void OnDisconnectedFromServer(NetworkDisconnection mode)
 {
     TurnOffServer();
     StrifeMasterServer.DeregisterWithMasterServer(this.port);
 }
 private void JoinGamePressed()
 {
     hosts      = StrifeMasterServer.GetMasterServerList();
     inJoinRoom = true;
 }
 void Start()
 {
     StartCoroutine(SendHeartbeat());
     StrifeMasterServer.RegisterWithMasterServer(port, gameName, gameDescription, gametype);
 }