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); }
public void JoinToGame(Puppet.Core.Model.DataLobby lobby) { view.ShowLoading(); APILobby.JoinLobby(lobby, (bool status, string message) => { view.HideLoading(); if (!status) { view.ShowError(message); } }); }
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)); } }); }
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)); } }); }
void OnClickBtnCreateGame(GameObject go) { LoadingView.Instance.Show(); APILobby.CreateLobby(currentBetting, data.numberPlayer, OnCreateLobbyCallBack); }
public void LoadChannels() { APILobby.AddListener(onCreateCallback, onUpdateCallback, onDeleteCallback); APILobby.GetGroupsLobby(OnGetGroupNameCallback); }