public void SetTxtHistory(SRSSlot20LineHistory data)
    {
        gameObject.SetActive(true);

        txt[0].text = data.SpinID.ToString();
        txt[1].text = data.Time;
        txt[2].text = VKCommon.ConvertStringMoney(data.TotalBetValue);
        txt[3].text = VKCommon.ConvertStringMoney(data.TotalPrizeValue);
        if (data.IsFree)
        {
            txt[4].text = "Miễn phí";
        }
        else
        {
            int iWin = (int)(data.TotalPrizeValue / data.TotalBetValue);
            if (iWin >= 25)
            {
                txt[4].text = "Giàu to";
            }
            else if (iWin >= 10)
            {
                txt[4].text = "Thắng lớn";
            }
            else
            {
                txt[4].text = "";
            }
        }
    }
Ejemplo n.º 2
0
    public void InitTutorial(SRSSlot20LineConfig config, double jackpot)
    {
        _config = config;

        gTutorialContent.SetActive(true);
        txtTutJackpot.text = VKCommon.ConvertStringMoney(jackpot);
    }
    public void LoadData(SRSSamLobbyItem data, int index)
    {
        this.data = data;

        gameObject.SetActive(true);
        gContent.SetActive(true);

        txtId.text     = data.Item1.ToString();
        txtBet.text    = VKCommon.ConvertStringMoney(data.Item1);
        txtMinBet.text = VKCommon.ConvertStringMoney(data.Item3);

        int status = 0;

        if (data.Item2 >= 2)
        {
            status = 1;
        }
        txtStatus.text  = strStatus[status];
        txtStatus.color = cStatus[status];

        txtUser.text = data.Item2.ToString();

        float maxTemp = max;

        if (maxTemp <= data.Item2)
        {
            maxTemp = data.Item2 + maxRange;
        }

        imgProgress.fillAmount = ((float)data.Item2 / maxTemp);
        //imgProgress.sprite = sprProgress[data.Item2 < maxTemp ? 0 : 1];
    }
Ejemplo n.º 4
0
 private void LoadRoomInfo()
 {
     roomBet.text     = VKCommon.ConvertStringMoney(_bacayData.MinBet);
     roomName.text    = _bacayData.Name;
     iconMoney.sprite = _bacayData.MoneyType == MoneyType.GOLD ? iconGold : iconCoin;
     UpdateMatchId();
 }
Ejemplo n.º 5
0
    private void SetLayoutRateConvert(CardCheck data)
    {
        dropPriceCard.ClearOptions();

        List <string> listDataOption = new List <string>();

        listDataOption.Add("Chọn mệnh giá");

        for (int i = 0; i < listElementRateConvert.Length; i++)
        {
            listElementRateConvert[i].gameObject.SetActive(false);
        }

        for (int i = 0; i < data.Prizes.Count; i++)
        {
            if (i >= listElementRateConvert.Length)
            {
                return;
            }

            listElementRateConvert[i].gameObject.SetActive(true);

            double quantityChip = (double)data.Prizes[i].Prize * (double)data.Prizes[i].Rate / 100;
            quantityChip += quantityChip * ((double)data.Prizes[i].Promotion / 100);

            listElementRateConvert[i].SetLayout(data.Prizes[i].Prize, data.Prizes[i].Promotion, (long)quantityChip);
            listDataOption.Add(VKCommon.ConvertStringMoney(data.Prizes[i].Prize));
        }

        dropPriceCard.AddOptions(listDataOption);
        dropPriceCard.value = 0;
    }
Ejemplo n.º 6
0
    private void SetLayoutRateConvert(CardCheck data)
    {
        dropPriceCard.ClearOptions();

        List <string> listDataOption = new List <string>();

        listDataOption.Add("Chọn mệnh giá");

        for (int i = 0; i < listElementRateConvert.Length; i++)
        {
            listElementRateConvert[i].gameObject.SetActive(false);
        }

        for (int i = 0; i < data.Prizes.Count; i++)
        {
            if (i > listElementRateConvert.Length)
            {
                return;
            }

            listElementRateConvert[i].gameObject.SetActive(true);

            long quantityRong = data.Prizes[i].Prize * (data.Prizes[i].Rate - data.Prizes[i].Promotion) / 100;

            listElementRateConvert[i].SetLayoutTransCard(data.Prizes[i].Prize, quantityRong);

            listDataOption.Add(VKCommon.ConvertStringMoney(data.Prizes[i].Prize));
        }

        dropPriceCard.AddOptions(listDataOption);
        dropPriceCard.value = 0;
    }
Ejemplo n.º 7
0
    public void ShowStatus(Sprite sprStatus, bool showMoney, double money, float timeAutoHide = 0)
    {
        imgStatus.sprite = sprStatus;

        if (ieAutoHideStatus != null)
        {
            StopCoroutine(ieAutoHideStatus);
            ieAutoHideStatus = null;
        }

        if (showMoney)
        {
            txtMoneyStatus.gameObject.SetActive(true);
            txtMoneyStatus.text  = (money > 0 ? "+" : "") + VKCommon.ConvertStringMoney(money);
            txtMoneyStatus.color = money > 0 ? cResultWin : cResultOther;
        }
        else
        {
            txtMoneyStatus.gameObject.SetActive(false);
        }

        if (timeAutoHide > 0)
        {
            ieAutoHideStatus = WaitAutoHideStatus(timeAutoHide);
            StartCoroutine(ieAutoHideStatus);
        }

        gStatus.SetActive(true);
    }
Ejemplo n.º 8
0
    public void ShowPrize(ResultList r, Sprite texWin, Sprite texLose)
    {
        if (r == null)
        {
            return;
        }

        HideFeedChecken();

        result.transform.parent.gameObject.SetActive(true);
        result.gameObject.SetActive(true);
        change.gameObject.SetActive(true);
        if (r.IsChickenKiller)
        {
            checkenKiler.gameObject.SetActive(true);
        }

        if (r.Change < 0)
        {
            result.sprite = texLose;
            change.text   = VKCommon.ConvertStringMoney(r.Change);
        }
        else
        {
            result.sprite = texWin;
            change.text   = "+" + VKCommon.ConvertStringMoney(r.Change);
        }

        sum.transform.parent.gameObject.SetActive(true);
        sum.text = r.Sum + " Điểm";
    }
Ejemplo n.º 9
0
    public void LoadData(SRSXocXocLobbyItem data, int index)
    {
        this.data = data;

        gameObject.SetActive(true);
        gContent.SetActive(true);
        imgBackground.color = new Color(imgBackground.color.r, imgBackground.color.g, imgBackground.color.b, index % 2 == 0 ? 0f : 1f);

        if (data.MaxPlayer > 40)
        {
            txtId.text = "Chung";
        }
        else
        {
            txtId.text = data.RoomID;
        }
        txtBet.text     = VKCommon.ConvertStringMoney(data.Bet);
        txtMinBet.text  = VKCommon.ConvertStringMoney(data.Bet);
        txtStatus.text  = strStatus[data.State];
        txtStatus.color = cStatus[data.State];

        txtUser.text = data.TotalPlayer + "/" + data.MaxPlayer;

        imgProgress.fillAmount = ((float)data.TotalPlayer / data.MaxPlayer);
    }
Ejemplo n.º 10
0
    public void RemoveChip(VKObjectPoolManager vkPool, List <UIBauCuaChip> uiChips, Transform tranWorld, bool isAnim = true)
    {
        if (isAnim)
        {
            foreach (BauCuaChip chip in bcChips)
            {
                chip.transform.SetParent(tranWorld);
                LeanTween.move(chip.gameObject, uiChips[chip.indexUiChip].transform.position, 0.2f).setOnComplete(() => {
                    vkPool.GiveBackObject(chip.gameObject);
                });
            }
        }
        else
        {
            foreach (BauCuaChip chip in bcChips)
            {
                vkPool.GiveBackObject(chip.gameObject);
            }
        }

        bcChips.Clear();
        meBetValue = 0;

        txtBetMe.text  = VKCommon.ConvertStringMoney(meBetOld);
        txtBetMe.color = cMeBets[0];
    }
Ejemplo n.º 11
0
    public void ClearUI()
    {
        StopAllCoroutines();

        uiCard.ClearUI();

        histories.Clear();

        vkBtBets.ForEach(a => a.VKInteractable      = true);
        vkBtBets[roomIdSelected - 1].VKInteractable = false;

        btStart.interactable   = true;
        btNewGame.interactable = true;
        btDown.interactable    = false;
        btUp.interactable      = false;

        txtMoneyAdd.text   = VKCommon.ConvertStringMoney(roomBetValues[roomIdSelected - 1]);
        txtMoneyOver.text  = "";
        txtMoneyUnder.text = "";
        txtHistory.text    = "";
        txtId.text         = "";

        txtHistoryNotify.gameObject.SetActive(true);

        vkCountDown.StopCountDown();
        vkCountDown.SetSeconds(timeCountDown);

        step   = 0;
        isAuto = false;

        gCardAts.ForEach(a => a.SetActive(false));
    }
Ejemplo n.º 12
0
    public void HandleBuyManual(object[] data)
    {
        UILayerController.Instance.HideLoading();
        double min = double.Parse(data[0].ToString());

        NotifyController.Instance.Open("Bạn cần tối thiểu " + VKCommon.ConvertStringMoney(min) + " để vào phòng!", NotifyController.TypeNotify.Error);
    }
Ejemplo n.º 13
0
    public void Load(SRSVuaBaoRankItem data)
    {
        gameObject.SetActive(true);

        txtTime.text = data.Time;
        txtName.text = data.Username;
        txtBet.text  = VKCommon.ConvertStringMoney(data.BetValue);
        txtWin.text  = VKCommon.ConvertStringMoney(data.TotalPrizeValue);
    }
    public void Load(SRSTaiXiuSessionLogItem info)
    {
        gameObject.SetActive(true);

        txtTime.text = info.Time;

        txtName.text = Database.Instance.Account().DisplayName.Equals(info.AccountName) ? VKCommon.FillColorString(info.AccountName, "#DBD476") : info.AccountName;
        txtHoan.text = VKCommon.ConvertStringMoney(info.Refund);
        txtDat.text  = VKCommon.ConvertStringMoney(info.Bet);
    }
Ejemplo n.º 15
0
    public void LoadHistory(SRSMiniPokerHistoryItem data)
    {
        gameObject.SetActive(true);

        txtId.text     = data.SpinID;
        txtTime.text   = data.Time;
        txtRoom.text   = VKCommon.ConvertStringMoney(data.BetValue);
        txtResult.text = VKCommon.ConvertCardIdToString(data.Card);
        txtWin.text    = VKCommon.ConvertStringMoney(data.PrizeValue);
    }
Ejemplo n.º 16
0
    public void ShowReward(double money, BonusItemType type)
    {
        isOpen = true;
        PlayAnim(type);

        if (money > 0)
        {
            txtValue.text = VKCommon.ConvertStringMoney(money);
        }
    }
    public void SetTxtHistoryJackpot(SRSSlot20LineJackpotItem data)
    {
        gameObject.SetActive(true);

        txt[0].text = data.Time;
        txt[1].text = data.Username;
        txt[2].text = data.SpinID.ToString();
        txt[3].text = VKCommon.ConvertStringMoney(data.RoomBetValue());
        txt[4].text = VKCommon.ConvertStringMoney(data.PrizeValue);
    }
    public void LoadRank(SRSHighLowRankItem data)
    {
        gameObject.SetActive(true);

        txtId.text     = data.Username;
        txtTime.text   = data.Time;
        txtRoom.text   = VKCommon.ConvertStringMoney(data.BetValue);
        txtWin.text    = VKCommon.ConvertStringMoney(data.PrizeValue);
        txtResult.text = "Nổ Hũ";
    }
    public void LoadHistory(SRSHighHistoryLowItem data)
    {
        gameObject.SetActive(true);

        txtId.text     = data.TurnID.ToString();
        txtTime.text   = data.Time;
        txtRoom.text   = VKCommon.ConvertStringMoney(data.BetValue);
        txtResult.text = VKCommon.ConvertCardIdToString(data.CardID);
        txtWin.text    = VKCommon.ConvertStringMoney(data.PrizeValue);
    }
Ejemplo n.º 20
0
    public void ShowSessionInfo(double betAll, double betMe, int userCount)
    {
        meBetValue = 0;

        txtBetAll.text = VKCommon.ConvertStringMoney(betAll);
        txtBetMe.text  = VKCommon.ConvertStringMoney(betMe);
        txtBetMe.color = cMeBets[0];

        meBetOld = betMe;
    }
Ejemplo n.º 21
0
    public void LoadRank(SRSMiniPokerRankItem data)
    {
        gameObject.SetActive(true);

        txtId.text     = data.Username;
        txtTime.text   = data.Time;
        txtRoom.text   = VKCommon.ConvertStringMoney(data.BetValue);
        txtWin.text    = VKCommon.ConvertStringMoney(data.PrizeValue);
        txtResult.text = VKCommon.ConvertCardTypeId(data.CardTypeID, true);
    }
Ejemplo n.º 22
0
    public void ShowNoticeInfoTransCard(long quantityCard, long quantityRong, int typeCard)
    {
        string nameCard = GetNameCard(typeCard);

        string notice = "Ban có chắc chắn muốn đổi thẻ {0} {1} với giá {2} vàng";

        notice = string.Format(notice, nameCard, VKCommon.ConvertStringMoney(quantityCard), VKCommon.ConvertStringMoney(quantityRong));

        LPopup.OpenPopupTop("Thống báo", notice, (value) => { RequestDoiThuong(value); }, true);
    }
Ejemplo n.º 23
0
    public void LoadLog(SRSBauCuaLogItem data)
    {
        gameObject.SetActive(true);

        txtId.text       = data.SessionId;
        txtTime.text     = data.Time;
        txtRoom.text     = data.GetGateBet();
        txtTotalBet.text = VKCommon.ConvertStringMoney(data.TotalBet);
        txtWin.text      = VKCommon.ConvertStringMoney(data.TotalAward);
    }
    public void SetLayoutLoadLoad(MTopUpHistory data)
    {
        txtId.text   = "#" + data.ID.ToString();
        txtTime.text = data.Time;
        string add = VKCommon.ConvertStringMoney(data.Amount);

        txtAdd.text = "+" + add;

        txtRemain.text = VKCommon.ConvertStringMoney(data.Balance);
    }
Ejemplo n.º 25
0
    private void HandleUpdateFeedChicken(Hub hub, MethodCallMessage methodCall)
    {
        int  accountId = Convert.ToInt32(methodCall.Arguments[0]);
        long totalFeed = Convert.ToInt64(methodCall.Arguments[1]);

        feedChecken.text = VKCommon.ConvertStringMoney(totalFeed);
        PlayerBaCayController player = GetPlayerByAccountId(accountId);

        player.ShowFeedChecken();
        MoveChip(player.transform.position, feedChecken.transform.position, timeToMoveChip, 0f);
    }
    public void Load(SRSBauCuaRankItem info, int rank)
    {
        gameObject.SetActive(true);

        gBackground.SetActive(rank % 2 == 0);

        txtRank.text = rank.ToString();

        txtName.text  = Database.Instance.Account().DisplayName.Equals(info.AccountName) ? VKCommon.FillColorString(info.AccountName, "#DBD476") : info.AccountName;
        txtMoney.text = VKCommon.ConvertStringMoney(info.Award);
    }
Ejemplo n.º 27
0
    public void ShowMeBetDone(double betMe)
    {
        meBetOld = betMe;

        lastMeBetValue = meBetValue;
        meBetValue     = 0;

        txtBetMe.text  = VKCommon.ConvertStringMoney(meBetOld);
        txtBetMe.color = cMeBets[0];

        animMe.SetTrigger("Play");
    }
Ejemplo n.º 28
0
    public void Load(SRSTaiXiuTransactionHistoryItem data, Color cWin, Color cLose, Color cNormal)
    {
        gameObject.SetActive(true);

        txtId.text     = "#" + data.SessionID.ToString("F0");
        txtTime.text   = data.Time;
        txtGate.text   = VKCommon.FillColorString(data.BetSide == 0 ? "TÀI" : "XỈU", "#" + (data.BetSide == data.Result ? ColorUtility.ToHtmlStringRGB(cWin) : ColorUtility.ToHtmlStringRGB(cLose)));
        txtResult.text = data.ResultText + VKCommon.FillColorString(" (" + (data.Result == 0 ? "TÀI" : "XỈU") + ")", "#" + ColorUtility.ToHtmlStringRGB(cNormal));
        txtBet.text    = VKCommon.ConvertStringMoney(data.Bet);
        txtRefund.text = VKCommon.ConvertStringMoney(data.Refund);
        txtWin.text    = VKCommon.ConvertStringMoney(data.Award);
    }
Ejemplo n.º 29
0
    public override void Reload()
    {
        base.Reload();
        WebServiceController.Instance.OnWebServiceResponse += OnWebServiceResponse;
        Database.Instance.OnUserUpdateGoldEvent            += OnUpdateGold;

        GetCaptcha();
        txtQuantityGold.text      = VKCommon.ConvertStringMoney(Database.Instance.Account().Gold);
        txtQuantityFee.text       = fee.ToString();
        txtQuantityGoldGive.text  = "0";
        txtQuantityGoldTrans.text = "0";
    }
Ejemplo n.º 30
0
    public override void Reload()
    {
        base.Reload();

        WebServiceController.Instance.OnWebServiceResponse += OnWebServiceResponse;
        Database.Instance.OnUserUpdateGoldEvent            += OnUpdateGold;

        inputQuantityGold.onEndEdit.AddListener(delegate { EndEditInputConvert(); });

        quantityGoldRemain         = (long)Database.Instance.Account().Gold;
        txtQuantityGoldRemain.text = VKCommon.ConvertStringMoney(quantityGoldRemain);
        txtQuantityCoinGive.text   = "0";
    }