예제 #1
0
 private void JoinRoom(GUIControlEventArgs EventArgs)
 {
     if ((GamesTable.SelectedIndex >= 0) && (GamesTable.SelectedIndex < GamesTable.Items.Count))
     {
         var GameInfo = GamesTable.Items[GamesTable.SelectedIndex];
         PhotonNetwork.JoinRoom(GameInfo.Name);
     }
 }
예제 #2
0
    private void SwitchBack(GUIControlEventArgs EventArgs)
    {
        GameObject.Find("MainMenu").GetComponent<GUIFrame>().enabled = true;

        PhotonNetwork.Disconnect();
        MasterServer.UnregisterHost();

        GetComponent<GUIFrame>().enabled = false;
    }
예제 #3
0
 private void Quit(GUIControlEventArgs EventArgs)
 {
     Application.Quit();
 }
예제 #4
0
 private void Multiplayer(GUIControlEventArgs EventArgs)
 {
     GameObject.Find("MultiplayerMenu").GetComponent<GUIFrame>().enabled = true;
     GetComponent<GUIFrame>().enabled = false;
 }
예제 #5
0
 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"});
 }