Пример #1
0
 public void DespawnPlayers()
 {
     players.ExecStatement(player => Destroy(player.gameObject));
     players.Reset();
     MultiplayerManager.PacketEvt     -= RecieveConnection;
     MultiplayerManager.DisconnectEvt -= Disconnection;
 }
Пример #2
0
 // Send out a list of objects which changed in the last time step
 private void PhysicsHandler()
 {
     if (MultiplayerManager.IsHost)
     {
         if (movedObjList.Count() != 0)
         {
             MultiplayerManager.peerManager?.SendDataToAllPeers(movedObjList.GetBytesFromList(), PacketType.objectMove, PacketValue.changeUpdate);
             movedObjList.Reset();
         }
     }
 }
Пример #3
0
 private void DeleteAllSelectors()
 {
     selectorList.ExecStatement(selector => Destroy(selector.gameObject));
     selectorList.Reset();
 }