Beispiel #1
0
    protected override void OnClickWipeOutTenBtn()
    {
        base.OnClickWipeOutTenBtn();

        ObjectSelf obj = ObjectSelf.GetInstance();

        if (obj == null)
        {
            return;
        }

        int limitVipLv = VIPModule.GetStageMopupVipLv();

        if (limitVipLv > obj.VipLevel)
        {
            InterfaceControler.GetInst().AddMsgBox("VIP" + limitVipLv + "开启该功能");
            return;
        }

        //没3星通关;
        if (RefreshStateInfo())
        {
            InterfaceControler.GetInst().AddMsgBox(GameUtils.getString("UI_raids_tips1"), selfTransform);
            return;
        }

        WipeOutHandler(10);
    }
Beispiel #2
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"));
    }