Ejemplo n.º 1
0
    private void OnDisconnection(int cnnID)
    {
        // remove this player from list
        clients.Remove(clients.Find(x => x.connectionID == cnnID));

        // tell all player some has disconnected
        Net_Disconnect msg = new Net_Disconnect {
            cnnID = cnnID
        };

        Send(msg, clients);
    }
Ejemplo n.º 2
0
 private void PlayerDisconnected(Net_Disconnect msg)
 {
     Destroy(players.Find(x => x.connectionID == msg.cnnID).avatar);
     players.Remove(players.Find(x => x.connectionID == msg.cnnID));
 }