public void DespawnPlayers() { players.ExecStatement(player => Destroy(player.gameObject)); players.Reset(); MultiplayerManager.PacketEvt -= RecieveConnection; MultiplayerManager.DisconnectEvt -= Disconnection; }
// 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(); } } }
private void DeleteAllSelectors() { selectorList.ExecStatement(selector => Destroy(selector.gameObject)); selectorList.Reset(); }