コード例 #1
0
    private void OnBuyBtn(ButtonScript obj, object args, int param1, int param2)
    {
        StoreTips stips = Tips.GetComponent <StoreTips>();
        int       count = stips.count;

        MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("shopbuyitem").Replace("{n}", count.ToString()).Replace("{n1}", stips.nameLabel.text).Replace("{n2}", (count * int.Parse(stips.jiageLabel.text)).ToString()
                                                                                                                                                            + LanguageManager.instance.GetValue("shuijing")), () => {
            NetConnection.Instance.buyDiscountStore(int.Parse(Tips.name), count);
        });
    }
コード例 #2
0
    private void OnBuyBtn(ButtonScript obj, object args, int param1, int param2)
    {
        StoreTips stips = Tips.GetComponent <StoreTips>();
        int       count = stips.count;

        if (MoreActivityData.instance.GetIntegralData().integral_ < (count * int.Parse(stips.jiageLabel.text)))
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("jifenbuzu"));
            return;
        }

        MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("shopbuyitem").Replace("{n}", count.ToString()).Replace("{n1}", stips.nameLabel.text).Replace("{n2}", (count * int.Parse(stips.jiageLabel.text)).ToString()
                                                                                                                                                            + LanguageManager.instance.GetValue("jifen")), () => {
            NetConnection.Instance.buyIntegralItem(uint.Parse(Tips.name), (uint)count);
        });
    }
コード例 #3
0
    void OnClickShop(ButtonScript obj, object args, int param1, int param2)
    {
        StoreUI.Instance.Tips.SetActive(true);
        if (GamePlayer.Instance.isInBattle)
        {
            StoreUI.Instance.Tips.GetComponent <StoreTips>().DetermineBtn.gameObject.SetActive(false);
        }
        else
        {
            StoreUI.Instance.Tips.GetComponent <StoreTips>().DetermineBtn.gameObject.SetActive(true);
        }
        StoreTips stips = StoreUI.Instance.Tips.GetComponent <StoreTips>();
        PropsCell cCell = obj.GetComponent <PropsCell>();

        stips.SpData = cCell.SpData;
    }
コード例 #4
0
    private void OnGetBtn(ButtonScript obj, object args, int param1, int param2)
    {
        COM_IntegralData data = MoreActivityData.instance.GetIntegralData();

        if (data == null)
        {
            return;
        }
        for (int i = 0; i < data.contents_.Length; i++)
        {
            if (data.contents_[i].itemid_ == param1)
            {
                if (data.contents_[i].times_ == 0)
                {
                    PopText.Instance.Show(LanguageManager.instance.GetValue("EN_DisShopLimitLess"));
                    return;
                }
            }
        }


        Tips.SetActive(true);
        UIManager.Instance.AdjustUIDepth(Tips.transform, false);
        StoreTips stips = Tips.GetComponent <StoreTips>();

        stips.nameLabel.text = ItemData.GetData(param1).name_;
        stips.count          = 1;
        stips.buyNumLab.text = "1";
        MoreDiscountStoreCellUI cellUI = obj.gameObject.GetComponent <MoreDiscountStoreCellUI>();

        Tips.name      = cellUI.integralData.id_.ToString();
        stips.maxCount = param2;
        ItemCellUI cellui = UIManager.Instance.AddItemCellUI(buyIcon, (uint)param1);

        cellui.showTips = true;

        stips.jiageLabel.text = param2.ToString();         // ((int)((float)cellUI.data.price_*cellUI.data.discount_)).ToString();
        stips.DesLabel.text   = ":" + ItemData.GetData(param1).desc_;
    }
コード例 #5
0
    private void OnGetBtn(ButtonScript obj, object args, int param1, int param2)
    {
        Tips.SetActive(true);
        UIManager.Instance.AdjustUIDepth(Tips.transform, false);
        StoreTips stips = Tips.GetComponent <StoreTips>();

        stips.nameLabel.text = ItemData.GetData(param1).name_;
        stips.count          = 1;
        stips.buyNumLab.text = "1";
        Tips.name            = param1.ToString();
        stips.maxCount       = param2;
        ItemCellUI cellui = UIManager.Instance.AddItemCellUI(buyIcon, (uint)param1);

        cellui.showTips = true;
        MoreDiscountStoreCellUI cellUI = obj.gameObject.GetComponent <MoreDiscountStoreCellUI>();

        int     price    = (int)cellUI.data.price_;
        decimal discount = (decimal)(cellUI.data.discount_ * 10f);
        decimal needM    = price * discount / 10;

        stips.jiageLabel.text = needM.ToString();
        stips.DesLabel.text   = ":" + ItemData.GetData(param1).desc_;
    }