Ejemplo n.º 1
0
    public void HuaweiSignIn()
    {
#if HMS
        BlockingPanel.Show("getting huawei info")
        .Forget(e => throw e);

        HMSAccountManager.Instance.SignIn();
#endif
    }
Ejemplo n.º 2
0
    /// <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;
        }
    }
Ejemplo n.º 3
0
    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
    }
Ejemplo n.º 4
0
    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();
    }
Ejemplo n.º 5
0
    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());
            }
        });
    }