Exemple #1
0
    private void BackToMain()
    {
        _currentMenu.SetEnabled(false);
        Debug.Log("Exiting to main");

        LevelSwitchoverManager.LoadScene(false, 0, CursorLockMode.None, typeof(PlayerState));
    }
Exemple #2
0
 public void PlayerDisconnectHandler(Player left)
 {
     if (left.IsMasterClient)
     {
         Debug.Log("Master client left the game, disconnecting from room");
         PhotonNetwork.Disconnect();
         LevelSwitchoverManager.LoadScene(false, 0, CursorLockMode.None, typeof(PlayerState));
     }
     else
     {
         UpdateAllClients(); //Might need to wait till next frame here
     }
 }