コード例 #1
0
 /// <summary>
 /// 刷新界面
 /// </summary>
 private void UpdateWindow(GuildLuckyNvShenInfo info)
 {
     selfIntegral.text  = "[FFF0C1]" + Language("GuildLuckyNvShen_03") + "[53DD6A]" + info.selfIntegral;
     guildIntegral.text = "[FFF0C1]" + Language("GuildLuckyNvShen_04") + "[53DD6A]" + info.guildIntegral;
     topIntegral.text   = "[FFF0C1]" + Language("GuildLuckyNvShen_05") + "[53DD6A]" + info.topIntegral;
     shakeCount.text    = "[FFF0C1]" + Language("GuildLuckyNvShen_06") + "[53DD6A]" + info.shakeCount;
     tapContentBase.changeTapPage(tapContentBase.getTapButtonByIndex(index));
 }
コード例 #2
0
 protected override void begin()
 {
     if (!isAwakeformHide)
     {
         tabContent.changeTapPage(tabContent.getTapButtonByIndex(currentContentIndex));
         dynamicContent.callbackUpdateEach = updatePage;
         dynamicContent.onCenterItem       = updateActivePage;
         UpdateContentView(QualityType.LEGEND);
     }
     MaskWindow.UnlockUI();
 }
コード例 #3
0
 protected override void begin()
 {
     base.begin();
     if (!isAwakeformHide)
     {
         content.SetUpdateItemCallback(OnContentUpdateItem);
         content.SetinitCallback(initItem);
         list        = GuildFightAwardSampleManager.Instance.getAllSample();
         currentList = new List <GuildFightAwardSample>();
         tabContent.changeTapPage(tabContent.getTapButtonByIndex(0));
         updateUI();
     }
     MaskWindow.UnlockUI();
 }
コード例 #4
0
    //void FixedUpdate()
    //{
    //    showAward();
    //}
    /** 更新Tap容器 */
    private void updateTapContent()
    {
//		if(!StarSoulConfigManager.Instance.isEnoughByShowHuntVipLevel()) {
//			tapContent=commonTapContent;
//			currentTapIndex=StarSoulConfigManager.HUNT_MONEY_TYPE;
//			commonTapContent.gameObject.SetActive(true);
//			vipTapContent.gameObject.SetActive(false);
//		} else {
        tapContent = vipTapContent;
        commonTapContent.gameObject.SetActive(false);
        vipTapContent.gameObject.SetActive(true);
        if (!StarSoulConfigManager.Instance.isEnoughByHuntVipLevel())
        {
            TapButtonBase tapButtonBase = vipTapContent.getTapButtonByIndex(1);
            if (tapButtonBase != null)
            {
                tapButtonBase.doEventButNoActive = true;
            }
        }
//		}
    }
コード例 #5
0
    /// <summary>
    /// 更新奖励的经验和等级,双倍消耗
    /// </summary>
    public void updateUI()
    {
//		if(tapFalg){
//			tapContent.changeTapPage (tapContent.tapButtonList [mSelecteTime]);
//			tapFalg=false;
//		}
        GoddessTrainingSample samplee = GoddessTrainingSampleManager.Instance.getDataBySid(22);

        string[] timeLimitLvv = samplee.TimeLimitLv;
        if (UserManager.Instance.self.getUserLevel() < StringKit.toInt(timeLimitLvv[mSelecteTime]))
        {
            tapContent.changeTapPage(tapContent.tapButtonList [mSelecteTime]);
            return;
        }
        updateTime();
        if (cdEndTime > ServerTimeKit.getSecondTime())
        {
            goddessSelectButton.disableButton(true);
        }
        else
        {
            goddessSelectButton.disableButton(false);
        }
        if (be == null)
        {
            lvjian.SetActive(false);
            enterButton.disableButton(true);
            headIcon.gameObject.SetActive(false);
            bg.SetActive(true);
            UI_TipsExpLabel.text = "";
            oldExpLabel.text     = "";
            oldLvLabel.text      = "";
            expjian.SetActive(false);
            overLabel.text      = "";
            UI_TipsLvLabel.text = "";
            jiantou.SetActive(false);
            selectLavel.text = LanguageConfigManager.Instance.getLanguage("s0376l8");
        }
        else
        {
            enterButton.disableButton(false);
            bg.SetActive(false);
            headIcon.gameObject.SetActive(true);
            selectLavel.text = be.getName();
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH, be, headIcon);
        }
        GoddessTrainingSample sample = GoddessTrainingSampleManager.Instance.getDataBySid(22);

        string[] timeLimitLv = sample.TimeLimitLv;
        for (int i = 0; i < timeLimitLv.Length; i++)  //这里是可以作废的 tap按钮上文字变化
        {
            TapButtonBase tap           = tapContent.getTapButtonByIndex(i);
            TapButtonBase tapButtonBase = tapContent.getTapButtonByIndex(i);
            if (UserManager.Instance.self.getUserLevel() < StringKit.toInt(timeLimitLv[i]))
            {
                tapButtonBase.doEventButNoActive = true;
                tap.textLabel.text = LanguageConfigManager.Instance.getLanguage("s0043l3", sample.TrainingTime[i]);
                tap.disableButton(false);
            }
            else
            {
                tapButtonBase.doEventButNoActive = false;
                tap.textLabel.text = LanguageConfigManager.Instance.getLanguage("s0043l3", sample.TrainingTime[i]);
                tap.disableButton(false);
            }
        }
        needRMBnum.text = LanguageConfigManager.Instance.getLanguage("s037615", sample.TimeRmb [mSelecteTime]);
        if (be == null)
        {
            return;
        }
        Card mCard = be;

        int vipLv = UserManager.Instance.self.vipLevel;
        int lv    = mCard.getLevel();

        mAwardExp = StringKit.toInt(sample.AwardExp [UserManager.Instance.self.getUserLevel() - 1]);
        int trainingTime = StringKit.toInt(sample.TrainingTime [mSelecteTime]);

        mAwardExp *= trainingTime;
        if (isDouble)
        {
            mAwardExp *= 2;
        }
        long  exp         = mCard.getEXP();
        float vipAwardExp = vipLv > 0 ? VipManagerment.Instance.getVipbyLevel(vipLv).privilege.expAdd * 0.0001f + 1 : 1;

        mAwardExp = (long)(vipAwardExp * mAwardExp);

        //最大能获取的经验值
        long AwardMaxExp = mAwardExp;

        mExpOverflow = false;

        long tmpExp = mCard.checkExp(mAwardExp);

        if (tmpExp != -1)
        {
            AwardMaxExp  = tmpExp;
            mExpOverflow = true;
        }

        //        mExpOverflow = AwardMaxExp < awardExp + exp;
        mMaxAwardExp = AwardMaxExp;
        mIsUpgrade   = mMaxAwardExp >= mCard.getNeedExp();
        if (mIsUpgrade)
        {
            jiantou.SetActive(true);
        }
        else
        {
            jiantou.SetActive(false);
        }
        //UI_TipsExpLabel.text = "+" + mAwardExp;
        oldExpLabel.text     = exp.ToString();
        UI_TipsExpLabel.text = (exp + mAwardExp).ToString();
        if (vipLv > 0)
        {
            if (!mExpOverflow)
            {
                //"+" + ((long)(mAwardExp / vipAwardExp))
                UI_TipsExpLabel.text = (exp + ((long)(mAwardExp / vipAwardExp))).ToString();
            }
            UI_TipsExpLabel.text += " x" + (vipAwardExp) + "(VIP" + vipLv.ToString() + ")";
        }

        int nextLv = 0;

        if (tmpExp != -1)
        {
            nextLv = EXPSampleManager.Instance.getLevel(mCard.getEXPSid(), tmpExp);
        }
        else
        {
            nextLv = EXPSampleManager.Instance.getLevel(mCard.getEXPSid(), mMaxAwardExp + exp);
        }
        //UI_TipsLvLabel.text = string.Format ("LV{0}             LV{1}", lv, nextLv);
        UI_TipsLvLabel.text = "Lv." + nextLv.ToString();
        oldLvLabel.text     = "Lv." + lv.ToString();
        if (mIsUpgrade)
        {
            lvjian.SetActive(true);
            lvjian.transform.localPosition = UI_TipsLvLabel.transform.localPosition + new Vector3(UI_TipsLvLabel.width + 10f, 0f, 0f);
        }
        else
        {
            lvjian.SetActive(false);
        }
        if (mAwardExp > 0)
        {
            expjian.SetActive(true);
            expjian.transform.localPosition = UI_TipsExpLabel.transform.localPosition + new Vector3(UI_TipsExpLabel.width + 10f, 0f, 0f);
        }
        else
        {
            expjian.SetActive(false);
        }
        if (mExpOverflow)
        {
            overLabel.text = "[ff0000]" + Language("cardtraining_expOverflow", (exp + mAwardExp) - AwardMaxExp) + "[-]";
//			if(expjian.activeInHierarchy){
//				overLabel.transform.localPosition=expjian.transform.localPosition+new Vector3(36f,0f,0f);
//			}else{
//				overLabel.transform.localPosition=UI_TipsExpLabel.transform.localPosition+new Vector3(UI_TipsExpLabel.width+10f,0f,0f);
//			}
//			UI_TipsExpLabel.text = "[ff0000]" + UI_TipsExpLabel.text + Language ("cardtraining_expOverflow", (exp + mAwardExp) - AwardMaxExp) + "[-]";
//			UI_TipsLvLabel.text = "[ff0000]" + UI_TipsLvLabel.text + "[-]";
            //UI_TipsExpLabel.text = "[ff0000]" + UI_TipsExpLabel.text + Language ("cardtraining_expOverflow", (exp + mAwardExp) - AwardMaxExp) + "[-]";
            //UI_TipsLvLabel.text = "[ff0000]" + UI_TipsLvLabel.text + "[-]";
        }
        else
        {
            overLabel.text = "";
        }

        //	UI_RmbLabel.text = string.Format (LanguageConfigManager.Instance.getLanguage ("CardTraining_07"), sample.TimeRmb [mSelecteTime]);
    }