private void JoinRoom(GUIControlEventArgs EventArgs) { if ((GamesTable.SelectedIndex >= 0) && (GamesTable.SelectedIndex < GamesTable.Items.Count)) { var GameInfo = GamesTable.Items[GamesTable.SelectedIndex]; PhotonNetwork.JoinRoom(GameInfo.Name); } }
private void SwitchBack(GUIControlEventArgs EventArgs) { GameObject.Find("MainMenu").GetComponent<GUIFrame>().enabled = true; PhotonNetwork.Disconnect(); MasterServer.UnregisterHost(); GetComponent<GUIFrame>().enabled = false; }
private void Quit(GUIControlEventArgs EventArgs) { Application.Quit(); }
private void Multiplayer(GUIControlEventArgs EventArgs) { GameObject.Find("MultiplayerMenu").GetComponent<GUIFrame>().enabled = true; GetComponent<GUIFrame>().enabled = false; }
private void CreateRoom(GUIControlEventArgs EventArgs) { PhotonNetwork.CreateRoom(String.Format("Test_{0}", UnityEngine.Random.Range(0, Int16.MaxValue)), true, true, 10, new Hashtable {{"Description", "This is a test."}}, new []{"Description"}); }