コード例 #1
0
 // ReSharper disable once UnusedMember.Local (Justification: invoked indirectly by photon)
 private void OnPhotonPlayerDisconnected([NotNull] global::PhotonPlayer player)
 {
     for (var i = 0; i < _disconnectListeners.Count; i++)
     {
         _disconnectListeners[i].PeerDisconnected(player);
     }
 }
コード例 #2
0
        // ReSharper disable once UnusedMember.Local (Justification: invoked indirectly by photon)
        private void OnMasterClientSwitched([NotNull] global::PhotonPlayer newMasterClient)
        {
            // The photon master client has switched. Kill the current local Dissonance network system, this will force it to
            // re-initialize (either as the host, if that responsibility is now ours, or as the client but properly connected to the new master).
            Stop();

            Log.Info("PUN Master Client switched to '{0}'. Resetting Dissonance network session", newMasterClient.ID);
        }
コード例 #3
0
 void PhotonCommsNetwork.IPhotonDisconnectListener.PeerDisconnected(global::PhotonPlayer peer)
 {
     ClientDisconnected(peer.ID);
 }