예제 #1
0
 public void LoadLobbiesByChannel(Puppet.Core.Model.DataChannel channel)
 {
     view.ShowLoading();
     selectedChannel = channel;
     lobbies         = new List <DataLobby>();
     IsFiltered      = false;
     view.DrawLobbies(lobbies);
     APILobby.SetSelectChannel(channel, OnCallbackAllLobbyInSelectedChannel);
 }
예제 #2
0
 public void JoinToGame(Puppet.Core.Model.DataLobby lobby)
 {
     view.ShowLoading();
     APILobby.JoinLobby(lobby, (bool status, string message) =>
     {
         view.HideLoading();
         if (!status)
         {
             view.ShowError(message);
         }
     });
 }
예제 #3
0
 public void PlayNow()
 {
     LoadingView.Instance.Show();
     //APIPlaza.Play();
     APILobby.QuickJoinLobby((status, message, data) =>
     {
         LoadingView.Instance.Show(false);
         int roomId = System.Convert.ToInt32(data);
         if (roomId < 0)
         {
             DialogService.Instance.ShowDialog(new DialogMessage("Message", message, null));
         }
     });
 }
예제 #4
0
 private void OnClickPlayNow(GameObject go)
 {
     APILobby.QuickJoinLobby((status, message, data) =>
     {
         int roomId = System.Convert.ToInt32(data);
         if (roomId == -1)
         {
             APILobby.CreateLobby(presenter.SelectedChannel.configuration.betting[0], 9, null);
         }
         else if (roomId == -2)
         {
             DialogService.Instance.ShowDialog(new DialogMessage("Message", message, null));
         }
     });
 }
예제 #5
0
 void OnClickBtnCreateGame(GameObject go)
 {
     LoadingView.Instance.Show();
     APILobby.CreateLobby(currentBetting, data.numberPlayer, OnCreateLobbyCallBack);
 }
예제 #6
0
 public void LoadChannels()
 {
     APILobby.AddListener(onCreateCallback, onUpdateCallback, onDeleteCallback);
     APILobby.GetGroupsLobby(OnGetGroupNameCallback);
 }