Ejemplo n.º 1
0
    void confirmRefresh(object para)
    {
        PlayerDataModule pdm = ModuleManager.Instance.FindModule <PlayerDataModule>();

        if (pdm == null)
        {
            return;
        }

        //if (ShopModule.SECRET_REFRESH_COST > pdm.GetProceeds(ShopModule.SECRET_REFRESH_PROC_TYPE))
        ProceedsType pt = ShopModule.GetSecretShopRefreshPoceType();

        if (ShopModule.GetSecretShopRefreshCost() > pdm.GetProceeds(pt))
        {
            //PromptUIManager.Instance.AddNewPrompt(ShopModule.GetBuyMoneyNotEnougthStr(pt));
            PopTipManager.Instance.AddNewTip(StringHelper.GetString("refresh_no_money", FontColor.Red));
            return;
        }

        ShopRefreshAction param = new ShopRefreshAction();

        param.OpType = (int)ShopOpType.Refresh;

        Net.Instance.DoAction((int)Message.MESSAGE_ID.ID_MSG_SHOP, param);
    }
Ejemplo n.º 2
0
    void refreshBtnClick()
    {
        string content = string.Format(StringHelper.GetString("shop_refresh_cost"), ShopModule.GetSecretShopRefreshCost());

        YesOrNoBoxManager.Instance.ShowYesOrNoUI("", content, confirmRefresh);
    }