public void LaunchSplitScreenGame() { if (PhotonNetwork.CurrentRoom != null && PhotonNetwork.CurrentRoom.PlayerCount > 1) { Logger.Log("Cannot play single player because there are already multiple players in this room."); return; } GameRules.SetGamePlayerType(GamePlayerType.SplitScreenMultiplayer); GameLaunchAction launcher = new GameLaunchAction(); launcher.Launch(); }
public void LaunchMultiplayerGame() { SetErrorText(""); if (PhotonNetwork.CurrentRoom.PlayerCount > 1) { GameRules.SetGamePlayerType(GamePlayerType.NetworkMultiplayer); GameLaunchAction launcher = new GameLaunchAction(); launcher.Launch(); } else { SetErrorText("You need a second player to start your game"); Debug.LogWarning("Could not launch the game because there is only 1 player in the game room."); } }