Esempio n. 1
0
    public static void OnTimeUpBtnClick(int exploreId)
    {
        //VIP等级不够;
        int openLv = VIPModule.GetExploreAccelerateVipLv();

        if (ObjectSelf.GetInstance().VipLevel < openLv)
        {
            InterfaceControler.GetInst().AddMsgBox(string.Format(GameUtils.getString("explore_bubble15"), openLv), UI_HomeControler.Inst.GetTopTransform());
            return;
        }

        tanxianinit mData   = ObjectSelf.GetInstance().GetExploreTaskDataById(exploreId);
        int         minutes = UI_ExploreModule.GetTaskMinuteToEnd(mData);
        int         cost    = UI_ExploreModule.GetCostByMinutes(minutes);
        //谈确认框;
        UI_RechargeBox box = UI_HomeControler.Inst.AddUI(UI_RechargeBox.UI_ResPath).GetComponent <UI_RechargeBox>();

        if (box == null)
        {
            LogManager.LogError("提示窗is null");
            return;
        }

        UI_RechargeBox.CurOpenType = EM_RECHARGEBOX_OPEN_TYPE.EXPLORE_TIMEUP_HINT;
        UI_RechargeBox.Data        = exploreId;
        box.SetIsNeedDescription(true);
        box.SetMoneyInfoActive(true);
        box.SetDescription_text(GameUtils.getString("explore_bubble7"));
        box.SetLeftBtn_text(GameUtils.getString("common_button_ok"));
        box.SetConNum(cost.ToString());
        box.SetConsume_Image(GameUtils.GetSpriteByResourceType(EM_RESOURCE_TYPE.Gold));
        box.SetMoneyInfo((int)EM_RESOURCE_TYPE.Gold, ObjectSelf.GetInstance().Gold);

        box.SetLeftClick(() =>
        {
            //InterfaceControler.GetInst().AddMsgBox("打开快速充值界面", parent);
            //UI_HomeControler.Inst.AddUI(UI_QuikChargeMgr.UI_ResPath);
            box.OnCloes();
            //已经过时;
            TimeSpan ts = GetTaskTimeToEnd(mData);
            if (ts <= TimeSpan.Zero)
            {
                return;
            }

            //钱不够;

            if (ObjectSelf.GetInstance().Gold < cost)
            {
                InterfaceControler.GetInst().ShowGoldNotEnougth();
                return;
            }

            UI_ExploreModule.SendOtherProtocol(CTanXianOther.END_SPEED, mData.tanxianid);
        });
        box.SetRightBtn_text(GameUtils.getString("common_button_close"));
    }
Esempio n. 2
0
    public static void OnCallBackBtnClick(int exploreId)
    {
        UI_RechargeBox box = UI_HomeControler.Inst.AddUI(UI_RechargeBox.UI_ResPath).GetComponent <UI_RechargeBox>();

        if (box == null)
        {
            LogManager.LogError("提示窗is null");
            return;
        }

        box.SetDescription_text(GameUtils.getString("explore_bubble8"));
        box.SetIsNeedDescription(false);
        box.SetLeftBtn_text(GameUtils.getString("common_button_ok"));
        box.SetLeftClick(() =>
        {
            UI_HomeControler.Inst.ReMoveUI(UI_RechargeBox.UI_ResPath);
            UI_ExploreModule.SendOtherProtocol(CTanXianOther.END_NULL, exploreId);
        });

        box.SetRightBtn_text(GameUtils.getString("common_button_close"));
    }