public void OnStartButtonClicked() { var launcher = RoomLauncher.Instance; var room = PhotonNetwork.CurrentRoom; if (room.PlayerCount < room.MaxPlayers) { Debug.Log("Not enough players"); warningPanel.Show(400, 200, "Not enough players."); return; } if (CheckReadiness()) { Debug.Log("Game is starting"); var setting = (GameSetting)room.CustomProperties[SettingKeys.SETTING]; SaveSettings(setting); launcher.GameStart(); } else { Debug.Log("Game cannot start, since some players are not ready"); warningPanel.Show(400, 200, "Game cannot start, some players are not ready."); } }
public void OnStartButtonClicked() { var launcher = RoomLauncher.Instance; var room = PhotonNetwork.CurrentRoom; if (room.PlayerCount < room.MaxPlayers) { Debug.Log("Not enough players"); warningPanel.Show(400, 200, "Not enough players."); return; } Debug.Log("Requesting game start"); launcher.GameStart(); }