// Show the UI for the gameover public void EndGameRPC(Team winningTeam) { // Stop timer Timer.roundTimer.End(); // Show endgame UI taskCompletionUI.UpdateBar(); timerCountdown.Stop(); deathUI.gameObject.SetActive(false); gameOverUI.OnGameOver(winningTeam); // Unlock mouse Cursor.lockState = CursorLockMode.None; Cursor.visible = true; // Stop the player from being able to move (so mouse movement only // affects the mouse in the UI) NetworkManager.instance.GetMe().Freeze(); // After a game has ended people can join the room again PhotonNetwork.CurrentRoom.IsVisible = true; }