public void HuaweiSignIn() { #if HMS BlockingPanel.Show("getting huawei info") .Forget(e => throw e); HMSAccountManager.Instance.SignIn(); #endif }
/// <summary> /// uses BlockingPanel /// </summary> public async UniTask Start(UniTask operation) { await BlockingPanel.Show(); try { await operation; BlockingPanel.Hide(); } catch (BadUserInputException) //todo test if you can get bad user input exc here { BlockingPanel.Done("operation is not allowed"); throw; } }
public async void RequestRandomRoom(int betChoice) { if (Repository.I.PersonalFullInfo.Money < RoomSettings.Bets[betChoice]) { Toast.I.Show(Translatable.GetText("no_money")); return; } await BlockingOperationManager.I.Start( Controller.I.RequestRandomRoom(betChoice, capacityChoiceButton.CurrentChoice)); BlockingPanel.Show("finding players") .Forget(e => throw e); //this is shown even if the room is started, it's removed before game start directly }
private void onStart(BoardGame.EValuationBasis valuationBasis, BoardGame.UserPlayer user, BoardGame.AIPlayer ai) { TurnPanel.OnStart(); CriterionPanel.Show(); BoardPanel.Show(); PresentPanel.OnStart(user, ai); CardPanel.OnStart(user, ai); PersonalInfoPanel.OnStart(valuationBasis, user, ai); BlockingPanel.Show(); GameStatePanel.Hide(); Show(); GameStatePanel.OnStart(); }
public void Challenge() { if (Repository.I.PersonalFullInfo.Money < RoomSettings.MinBet) { Toast.I.Show(Translatable.GetText("no_money")); } UniTask.Create(async() => { var res = await Controller.I.InvokeAsync <MatchRequestResult>("RequestMatch", Id); if (res == MatchRequestResult.Available) { BlockingPanel.Show("a challenge request is sent to the player", () => Controller.I.Send("CancelChallengeRequest")) .Forget(e => throw e); } else { Toast.I.Show(res.ToString()); } }); }