Esempio n. 1
0
    private void OnPlayerRemoved(string playfabId)
    {
        ConnectedPlayer player = _connectedPlayers.Find(x => x.PlayerId.Equals(playfabId, StringComparison.OrdinalIgnoreCase));

        _connectedPlayers.Remove(player);
        PlayFabMultiplayerAgentAPI.UpdateConnectedPlayers(_connectedPlayers);
        CheckPlayerCountToShutdown();
    }
Esempio n. 2
0
    private void OnServerRemovedPlayer(string infabid)
    {
        H.klog1($"A Player just left the server, fab will update and shutdown if neccessary", this.name);

        ///*
        // look in fab book, if existing then remove
        //foreach (ConnectedPlayer pl in _fabPlayerBook)
        for (int i = 0; i < _fabPlayerBook.Count; i++)
        {
            ConnectedPlayer pl = _fabPlayerBook[i];
            if (pl.PlayerId.Equals(infabid, StringComparison.OrdinalIgnoreCase))
            {
                _fabPlayerBook.Remove(pl);
                break;
            }
        }//*/
        PlayFabMultiplayerAgentAPI.UpdateConnectedPlayers(_fabPlayerBook);
        CheckConnToShutDown();
    }