Пример #1
0
    private void OnUserUpdateGold(MAccountInfoUpdateGold info)
    {
        if (_xocxoc.moneyType == MoneyType.GOLD)
        {
            txtMyMoney.SetNumber(info.Gold);

            if (_xocxoc.IsDealer())
            {
                uiPlayerMaster.UpdatePlayer(info.Gold);
            }
        }
    }
Пример #2
0
    public void HandlePlayerBet(object[] data)
    {
        string playerId = data[0].ToString();
        List <SRSXocXocBetGateResponse> gateSuccess = JsonConvert.DeserializeObject <List <SRSXocXocBetGateResponse> >(BestHTTP.JSON.Json.Encode(data[1]));
        double balance = double.Parse(data[2].ToString());

        UIXocXocPlayer uiPlayer = uiPlayers.FirstOrDefault(a => a.IsPlayer(playerId));

        if (uiPlayer != null)
        {
            uiPlayer.UpdatePlayer(balance);
        }

        AudioAssistant.Instance.PlaySoundGame(_config.gameId, _config.audioNemCoin);
        foreach (var item in gateSuccess)
        {
            var uiGate = uiGates.FirstOrDefault(a => a.gateType == (XocXocGate)item.gate);
            if (uiGate != null)
            {
                Dictionary <int, int> fakeChips = ConvertTotalMoneyToChip(item.amount);
                PlayerAutoBet(fakeChips, uiGate, uiPlayer != null ? uiPlayer.transform : transOtherPlayer);

                uiGate.ShowBetAll(item.gateTotal);
            }
            if (uiPlayer != null)
            {
                uiPlayer.PlayerGateBet((XocXocGate)item.gate, item.amount);
            }
        }
    }