public override void OnStopServer() { OnServerStopped?.Invoke(); RoomPlayers.Clear(); GamePlayers.Clear(); }
public void EndGame() { if ("Assets/Scenes/" + SceneManager.GetActiveScene().name + ".unity" == gameScene) { ServerChangeScene("EndScene"); for (int i = 0; i < Players.Count; i++) { NetworkServer.Destroy(Players[i].gameObject); NetworkServer.DestroyPlayerForConnection(Players[i].connectionToClient); } RoomPlayers.Clear(); GamePlayers.Clear(); Players.Clear(); } }
public override void OnStopServer() { RoomPlayers.Clear(); GamePlayers.Clear(); Players.Clear(); }
public override void OnStopServer() { LobbyPlayers.Clear(); GamePlayers.Clear(); }