コード例 #1
0
    /**这里时时更新行动力或boss挑战次数的恢复时间 */
    private void updatePVE_PVP()
    {
        UI_PVEBar.updateValue(UserManager.Instance.self.getPvEPoint(), UserManager.Instance.self.getPvEPointMax());
        UI_PVEValue.text = UserManager.Instance.self.getPvEPoint() + "/" + UserManager.Instance.self.getPvEPointMax();
        UI_PVETime.gameObject.SetActive(!UserManager.Instance.self.isPveMax());
        if (UI_PVETime.gameObject.activeSelf)
        {
            UI_PVETime.text = UserManager.Instance.getNextPveTime().Substring(3);
        }
        //////////////
        bool flag = UserManager.Instance.self.getStorePvEPoint() > 0;

        UI_PVEBar.gameObject.SetActive(true);
        storeBar.gameObject.SetActive(true);

        //UI_PVPBar.updateValue (UserManager.Instance.self.getPvPPoint (), UserManager.Instance.self.getPvPPointMax ());
        for (int ii = 0; ii < UI_PVPBars.Length; ii++)
        {
            if (UserManager.Instance.self.getPvPPoint() >= (ii + 1))
            {
                UI_PVPBars[ii].SetActive(true);
            }
            else
            {
                UI_PVPBars[ii].SetActive(false);
            }
        }
        if (UserManager.Instance.self.isPvpMax())
        {
            UI_PVPTime.gameObject.SetActive(false);
        }
        else
        {
            UI_PVPTime.gameObject.SetActive(true);
            UI_PVPTime.text = UserManager.Instance.getNextPvpTime().Substring(3);
        }

        //if(flag){
        storeBar.updateValue(UserManager.Instance.self.getStorePvEPoint(), UserManager.Instance.self.getStorePvEPointMax());
        store_value.text = UserManager.Instance.self.getStorePvEPoint() + "/" + UserManager.Instance.self.getStorePvEPointMax();
        if (!UserManager.Instance.self.isPveMax() || UserManager.Instance.self.isStorePveMax())
        {
            store_time.gameObject.SetActive(false);
        }
        else
        {
            store_time.gameObject.SetActive(true);
            store_time.text = UserManager.Instance.getNextMountsPveTime().Substring(3);
        }
        //}else{
        UI_PVEBar.updateValue(UserManager.Instance.self.getPvEPoint(), UserManager.Instance.self.getPvEPointMax());
        UI_PVEValue.text = UserManager.Instance.self.getPvEPoint() + "/" + UserManager.Instance.self.getPvEPointMax();
//			if (UserManager.Instance.self.isPveMax ()) {
//				UI_PVETime.gameObject.SetActive (false);
//			} else {
//				UI_PVETime.gameObject.SetActive (true);
//				UI_PVETime.text = UserManager.Instance.getNextPveTime ().Substring (3);
//			}
        //}
    }
コード例 #2
0
    /*
     * protected void onChangePageHandler (int _currentPageIndex)
     * {
     *      vips = VipManagerment.Instance.getAllVip ();
     *      vipTitleLabel.text = "VIP " + vips [_currentPageIndex].vipLevel + LanguageConfigManager.Instance.getLanguage ("s0314");
     *      showGiftLevel = _currentPageIndex + 1;
     *      updateVipAwardInfo ();
     * }
     *
     * void Start ()
     * {
     *      radioScrollBar.onChangePage = onChangePageHandler;
     *      ResourcesManager.Instance.LoadAssetBundleTexture (UserManager.Instance.self.getIconPath (), icon);
     *      Vip[] vips = VipManagerment.Instance.getAllVip ();
     *      for (int i = 0; i < vipPages.Length && i < vips.Length; i++) {
     *              vipPages [i].vipinfo = vips [i];
     *              vipPages [i].updatePage ();
     *      }
     *      int level = UserManager.Instance.self.getVipLevel ();
     *      if (level > 0) {
     *              Vector3 currentVipPosition = vipPages [level - 1].transform.localPosition;
     *              Vector3 currentViewPosition = transform.localPosition;
     *              currentViewPosition.x = -currentVipPosition.x;
     *              SpringPanel.Begin (scrollView.gameObject, currentViewPosition, 1000f);
     *              sprite_vipIcon.gameObject.SetActive (true);
     *              sprite_vipIcon.spriteName = "vip" + level.ToString ();
     *              sprite_vipIcon.MakePixelPerfect ();
     *      } else {
     *              onChangePageHandler (0);
     *              sprite_vipIcon.gameObject.SetActive (false);
     *      }
     * }
     */
    public void updateInfo()
    {
        UserManager.Instance.setSelfHeadIcon(icon);

        int level = UserManager.Instance.self.getVipLevel();

        if (level > 0)
        {
            sprite_vipIcon.gameObject.SetActive(true);
            sprite_vipIcon.spriteName = "vip" + level;
            sprite_vipIcon.MakePixelPerfect();
        }
        else
        {
            sprite_vipIcon.gameObject.SetActive(false);
        }

        float exp     = (float)UserManager.Instance.self.getVipEXP() - (float)UserManager.Instance.self.getVipEXPDown();
        float expNeed = (float)UserManager.Instance.self.getVipEXPUp() - (float)UserManager.Instance.self.getVipEXPDown();

        if (UserManager.Instance.self.getVipLevel() == 0)
        {
            userVipInfo        = VipManagerment.Instance.getVipbyLevel(1);
            vipLevelLabel.text = LanguageConfigManager.Instance.getLanguage("s0319");
            nextLevelTip.text  = LanguageConfigManager.Instance.getLanguage("s0313", ((int)(expNeed - exp)).ToString(), (UserManager.Instance.self.getVipLevel() + 1).ToString());
        }
        else
        {
            userVipInfo = VipManagerment.Instance.getVipbyLevel(UserManager.Instance.self.vipLevel);
            //当前级别:VIP 1
            vipLevelLabel.text = LanguageConfigManager.Instance.getLanguage("s0317") + ":";             //VIP " + userVipInfo.vipLevel.ToString ();
            if (VipManagerment.Instance.getMaxLevel() == UserManager.Instance.self.vipLevel)
            {
                nextLevelTip.text = LanguageConfigManager.Instance.getLanguage("s0318");
            }
            else
            {
                //s0313|再充值 %1元可成为VIP%2
                nextLevelTip.text = LanguageConfigManager.Instance.getLanguage("s0313", ((int)(expNeed - exp)).ToString(), (UserManager.Instance.self.getVipLevel() + 1).ToString());
            }
        }

        //可能从隐藏回来调用,先重置
        expbar.reset();

        if (expNeed == 0)
        {
            //满级
            expbar.updateValue(1, 1);
            vipExpLabel.text = (int)UserManager.Instance.self.getVipEXP() + "/" + (int)UserManager.Instance.self.getVipEXPUp();
        }
        else
        {
            expbar.updateValue(UserManager.Instance.self.getVipEXP(), UserManager.Instance.self.getVipEXPUp());
            vipExpLabel.text = (int)UserManager.Instance.self.getVipEXP() + "/" + (int)UserManager.Instance.self.getVipEXPUp();
        }

        vipIcon.text = "VIP " + UserManager.Instance.self.vipLevel;
    }
コード例 #3
0
 /// <summary>
 /// 复活信息
 /// </summary>
 public void updateReviveUI()
 {
     //buttonRevive.disableButton (false);
     data.curBlood = 1;
     data.maxBlood = 1;
     bloodCtrl.updateValue(data.curBlood, data.maxBlood);
     updatePower();
 }
コード例 #4
0
 void updateExp()
 {
     if (UserManager.Instance.self.divineFortune >= 50)
     {
         expbar.updateValue(MAX_DIVINE, MAX_DIVINE);
         expLabel.text = LanguageConfigManager.Instance.getLanguage("divine_05", (MAX_DIVINE + "/" + MAX_DIVINE));
     }
     else
     {
         expbar.updateValue(UserManager.Instance.self.divineFortune, MAX_DIVINE);
         expLabel.text = LanguageConfigManager.Instance.getLanguage("divine_05", UserManager.Instance.self.divineFortune + "/" + MAX_DIVINE);
     }
 }
コード例 #5
0
 public void updateUI(GuildAreaPoint point)
 {
     this.point      = point;
     bloodLabel.text = point.bloodNow + "/" + point.bloodMax;
     blood.updateValue(point.bloodNow, point.bloodMax);
     vip.spriteName = "vip_" + point.vipLevel;
     name.text      = point.getName();
     ResourcesManager.Instance.LoadAssetBundleTexture(point.getHeadIconPath(), headTex);
     if (point.bloodNow == 0)
     {
         showDeadUI();
     }
 }
コード例 #6
0
    /// <summary>
    /// 加载显示
    /// </summary>
    public void loadShow()
    {
        if (card == null)
        {
            return;
        }
        ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + card.getImageID(), cardimage);
        cardName.text = card.getName();
        UpdateTopBackGround();
        initButton();
        UpdateQualityEffect();
        expBar.reset();
        expBar.updateValue(EXPSampleManager.Instance.getNowEXPShow(card.getEXPSid(), card.getEXP()), EXPSampleManager.Instance.getMaxEXPShow(card.getEXPSid(), card.getEXP()));
//        expLabel.text = EXPSampleManager.Instance.getNowEXPShow(card.getEXPSid(), card.getEXP()) + "/" + EXPSampleManager.Instance.getMaxEXPShow(card.getEXPSid(), card.getEXP());
        jobLabel.spriteName   = CardManagerment.Instance.qualityIconTextToBackGround(card.getJob()) + "s";
        qualityIco.spriteName = QualityManagerment.qualityIDToString(card.getQualityId()) + "Bg";
        qualityIco.alpha      = 1;
        updateAttributes();
        updateSkill();
        parent.setTitle(QualityManagerment.getQualityColor(card.getQualityId()) + card.getName());
        cardLevelLabel.text = "Lv." + card.getLevel() + "/" + card.getMaxLevel();
        evoLabel.spriteName = card.isMainCard() ? "attr_evup" : "attr_ev";
        if (EvolutionManagerment.Instance.getMaxLevel(card) == 0)
        {
            evoTimes.text = LanguageConfigManager.Instance.getLanguage("Evo10");
        }
        else
        {
            evoTimes.text = card.isMainCard() ? card.getSurLevel() + "/" + SurmountManagerment.Instance.getMaxSurLevel(card) : card.getEvoLevel() + "/" + card.getMaxEvoLevel();
        }
    }
コード例 #7
0
    private void updataBar()
    {
        int numm = UserManager.Instance.self.getPvPPoint();

        for (int i = 0; i < pvpSprits.Length; i++)
        {
            if (i < numm)
            {
                pvpSprits[i].SetActive(true);
            }
            else
            {
                pvpSprits[i].SetActive(false);
            }
        }
        //pvpBar.updateValue (UserManager.Instance.self.getPvPPoint (), UserManager.Instance.self.getPvPPointMax ());
        bool flag = UserManager.Instance.self.getStorePvEPoint() > 0;

        pveBar.gameObject.SetActive(!flag);
        storeBar.gameObject.SetActive(flag);
        if (flag)
        {
            storeBar.updateValue(UserManager.Instance.self.getStorePvEPoint(), UserManager.Instance.self.getStorePvEPointMax());
            storeValue.text = UserManager.Instance.self.getStorePvEPoint() + "/" + UserManager.Instance.self.getStorePvEPointMax();
        }
        else
        {
            pveBar.updateValue(UserManager.Instance.self.getPvEPoint(), UserManager.Instance.self.getPvEPointMax());
            pveValue.text = UserManager.Instance.self.getPvEPoint() + "/" + UserManager.Instance.self.getPvEPointMax();
        }
    }
コード例 #8
0
    public void updateBeast(BeastEvolve chooseItem)
    {
        if (chooseItem == null)
        {
            return;
        }

        if (iscacheAudioOK && AudioManager.Instance.IsAudioOpen)
        {
            playGoddessSound(chooseItem);
        }

        updateSelectedCard(chooseItem);
        changeButton();
        updateCondition(chooseItem);
        level.text = "Lv." + selectedCard.getLevel() + "/" + selectedCard.getMaxLevel();
        int  expSid = selectedCard.getEXPSid();
        long _exp   = selectedCard.getEXP();
        long nowExp = EXPSampleManager.Instance.getNowEXPShow(expSid, _exp);
        long maxExp = EXPSampleManager.Instance.getMaxEXPShow(expSid, _exp);

        expbar.updateValue(nowExp, maxExp);

        if (evolveCard != null && evolveCard.getEXP() > 0)
        {
            CardBaseAttribute oldAttr = CardManagerment.Instance.getCardWholeAttr(evolveCard);
            CardBaseAttribute newAttr = CardManagerment.Instance.getCardWholeAttr(selectedCard);
            hp.text     = oldAttr.getWholeHp().ToString();
            att.text    = oldAttr.getWholeAtt().ToString();
            def.text    = oldAttr.getWholeDEF().ToString();
            mag.text    = oldAttr.getWholeMAG().ToString();
            dex.text    = oldAttr.getWholeAGI().ToString();
            jinhua.text = (evolveCard.getQualityId() - 1).ToString() + "/4";
            hp.text    += "[64ED6E]" + " + " + (newAttr.getWholeHp() - oldAttr.getWholeHp()).ToString() + "[-]";
            att.text   += "[64ED6E]" + " + " + (newAttr.getWholeAtt() - oldAttr.getWholeAtt()).ToString() + "[-]";
            def.text   += "[64ED6E]" + " + " + (newAttr.getWholeDEF() - oldAttr.getWholeDEF()).ToString() + "[-]";
            mag.text   += "[64ED6E]" + " + " + (newAttr.getWholeMAG() - oldAttr.getWholeMAG()).ToString() + "[-]";
            dex.text   += "[64ED6E]" + " + " + (newAttr.getWholeAGI() - oldAttr.getWholeAGI()).ToString() + "[-]";
            evolveCard  = null;
        }
        else
        {
            CardBaseAttribute attr = CardManagerment.Instance.getCardWholeAttr(selectedCard);
            hp.text  = attr.getWholeHp().ToString();
            att.text = attr.getWholeAtt().ToString();
            def.text = attr.getWholeDEF().ToString();
            mag.text = attr.getWholeMAG().ToString();
            dex.text = attr.getWholeAGI().ToString();

            jinhua.text = (selectedCard.getQualityId() - 1).ToString() + "/4";
        }

        titleName = "horStar" + selectedCard.getTitleName(selectedCard.sid);
        setTitle(titleName, selectedCard.getName());
        quality.spriteName = QualityManagerment.qualityIDToStringByBG(selectedCard.getQualityId());
        quality.gameObject.SetActive(true);
        string str = LanguageConfigManager.Instance.getLanguage("s0371");

        InitSkill();
    }
コード例 #9
0
ファイル: PveUseWindow.cs プロジェクト: xiney1986/SDKProject
 private void initPower()
 {
     pveLimitTip.text = LanguageConfigManager.Instance.getLanguage("pveUse05", CommonConfigSampleManager.Instance.getSampleBySid <PvePowerMaxSample> (CommonConfigSampleManager.PvePowerMax_SID).pvePowerMax.ToString());
     bar.updateValue(UserManager.Instance.self.getPvEPoint(), UserManager.Instance.self.getPvEPointMax());
     barValue.text   = UserManager.Instance.self.getTotalPvEPoint() + "/" + UserManager.Instance.self.getPvEPointMax();
     pveUse_tip.text = LanguageConfigManager.Instance.getLanguage("pveUse02", restorePveAll.ToString());
     //检查包裹里是否有大行动力药剂,没有就显示购买界面
     if (!StorageManagerment.Instance.checkProp(PropType.PROP_PVES, 1))
     {
         costRMB.gameObject.SetActive(true);
         totalRMB.gameObject.SetActive(true);
         RMB_1.gameObject.SetActive(true);
         RMB_2.gameObject.SetActive(true);
         restoreAllProp.gameObject.SetActive(false);
         totalRMB.text = LanguageConfigManager.Instance.getLanguage("pveUse08", UserManager.Instance.self.getRMB().ToString());
         //获取次数对应的钻石消耗
         int costRmb = CommonConfigSampleManager.Instance.getSampleBySid <PveBuyCostRMB> (CommonConfigSampleManager.PveBuyCostRMB_SID).getCostByCount(PveUseCount);
         costRMB.text = LanguageConfigManager.Instance.getLanguage("pveUse07", costRmb.ToString());
         //更新主界面的RMB显示
         if (UiManager.Instance.mainWindow != null)
         {
             UiManager.Instance.mainWindow.update_RMB();
         }
     }
 }
コード例 #10
0
    //滑动后更新
    private void updateActivePage(GameObject obj)
    {
        curAngelIndex  = StringKit.toInt(obj.name) - 1;
        curAngel       = angelList [curAngelIndex];
        angelName.text = curAngel.name;
        Transform angelTran = obj.transform.GetChild(0).GetComponent <Transform> ();

        if (curAngel.index != ownIndex)
        {
            attrObj.SetActive(false);
            bg.SetActive(false);
            bg1.SetActive(true);
            angelTran.localPosition = new Vector3(0f, 0f, 0f);
        }
        else
        {
            User user = UserManager.Instance.self;
            attrObj.SetActive(true);
            bg.SetActive(true);
            bg1.SetActive(false);
            angelTran.localPosition = pos4;
            angelLevel.text         = "Lv." + user.getVipLevel();
            angelDes.text           = curAngel.description[curAngel.description.Length - 1];
            angelExpBar.updateValue(user.getVipLevel(), 12);
        }
        AngelItem item = obj.GetComponentInChildren <AngelItem> ();

        item.init(this, curAngel);
        UpdateUI();
        AngelItem[] list = sampleContent.gameObject.GetComponentsInChildren <AngelItem> ();
        for (int i = 0; i < list.Length; i++)
        {
            if (StringKit.toInt(list[i].gameObject.name) - 1 != curAngelIndex)
            {
                list[i].removeAngelModel();
            }
        }
        //更新箭头
        if (angelList.Count == 1)
        {
            arrowLeft.gameObject.SetActive(false);
            arroRight.gameObject.SetActive(false);
        }
        else if (curAngel.index == 1)
        {
            arrowLeft.gameObject.SetActive(false);
            arroRight.gameObject.SetActive(angelDrag.enabled);
        }
        else if (curAngel.index == angelList.Count)
        {
            arrowLeft.gameObject.SetActive(true);
            arroRight.gameObject.SetActive(false);
        }
        else
        {
            arrowLeft.gameObject.SetActive(true);
            arroRight.gameObject.SetActive(true);
        }
    }
コード例 #11
0
    /** 更新存储行动力 */
    private void updateStorePve()
    {
        MountsConfigManager config  = MountsConfigManager.Instance;
        MountsManagerment   manager = MountsManagerment.Instance;
        User user = UserManager.Instance.self;

        pveStoreBar.updateValue(user.getStorePvEPoint(), user.getStorePvEPointMax());
        pveStoreValue.text = user.getStorePvEPoint() + "/" + user.getStorePvEPointMax() + "(" + LanguageConfigManager.Instance.getLanguage("s0572") + ")";
    }
コード例 #12
0
 void refreshData()
 {
     //若主界面看不到,不做如下的更新
     if (this == null || !gameObject.activeInHierarchy)
     {
         if (timer != null)
         {
             timer.stop();
             timer = null;
         }
         return;
     }
     if (pveStoreBar.gameObject.activeInHierarchy)
     {
         pveStoreBar.updateValue(UserManager.Instance.self.getStorePvEPoint(), UserManager.Instance.self.getStorePvEPointMax());
         pveStoreValue.text = UserManager.Instance.self.getStorePvEPoint() + "/" + UserManager.Instance.self.getStorePvEPointMax() + "(" + LanguageConfigManager.Instance.getLanguage("s0572") + ")";
     }
 }
コード例 #13
0
    /// <summary>
    /// 更新视图 包括自己的奖章 和 自己的称号信息
    /// </summary>
    private void updateView()
    {
        int userP = UserManager.Instance.self.prestige;

        LaddersTitleSample currentTitleSample = LaddersConfigManager.Instance.config_Title.M_getTitle(userP);

        label_title.text = currentTitleSample.name;
        updateDes(root_title_currentDes, currentTitleSample.addDescriptions);

        LaddersTitleSample nextTitleSample = LaddersConfigManager.Instance.config_Title.M_getTitleByIndex(currentTitleSample.index + 1);

        if (nextTitleSample != null)
        {
            bar_title.updateValue(userP, nextTitleSample.minPrestige);
            label_barProgress.text = userP + "/" + nextTitleSample.minPrestige;
        }
        else
        {
            bar_title.updateValue(userP, userP);
            label_barProgress.text = userP + "/" + userP;
        }

        //int userRank=LaddersManagement.Instance.currentPlayerRank;
        int sid = LaddersManagement.Instance.currentPlayerMedalSid;
        LaddersMedalSample medalSample = LaddersConfigManager.Instance.config_Medal.M_getMedalBySid(sid);

        if (medalSample != null)
        {
            label_medal_title.text = medalSample.name;
            sprite_medal.gameObject.SetActive(true);
            sprite_medal.spriteName = "medal_" + Mathf.Min(medalSample.index + 1, 5);

            label_medal_tip.gameObject.SetActive(false);
            updateDes(root_medal_Des, medalSample.addDescriptions);
        }
        else
        {
            sprite_medal.gameObject.SetActive(false);
            label_medal_tip.gameObject.SetActive(true);

            label_medal_title.text = Language("laddersTip_09");
            updateDes(root_medal_Des, null);
        }
    }
コード例 #14
0
    void updatePlayerInfo()
    {
        if (player != null)
        {
            //name
            playerCardName.text = player.card.getName();
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + player.card.getImageID(), playerCardImage);


            player_hpbar.updateValue(player.getHp(), player.getHpMax());
            int per = (int)(player.getHp() * 100 / player.getHpMax());
            if (per == 0)
            {
                per++;
            }
            playerHpNum.text = per + "%";

            playerLv.text     = "Lv." + player.getLevel() + "";
            playerCombat.text = player.card.getCardCombat() + "";
            //exp
//			player_expbar.updateValue (player.card.getEXP (), player.card.getEXPUp ());
            player_expbar.updateValue(EXPSampleManager.Instance.getNowEXPShow(player.card.getEXPSid(), player.card.getEXP())
                                      , EXPSampleManager.Instance.getMaxEXPShow(player.card.getEXPSid(), player.card.getEXP()));
            per = (int)(EXPSampleManager.Instance.getNowEXPShow(player.card.getEXPSid(), player.card.getEXP()) * 100 / EXPSampleManager.Instance.getMaxEXPShow(player.card.getEXPSid(), player.card.getEXP()));
            if (per == 0)
            {
                per++;
            }
            playerExpNum.text = per + "%";

            //	playerMedicalButton.gameObject.SetActive (true); //功能未开放
//			if (player.getHp () == player.getHpMax ()) {
//				playerMedicalButton.gameObject.SetActive (false);
//			}
            if (player.getHp() == 0)
            {
                playerMedicalButton.textLabel.text = LanguageConfigManager.Instance.getLanguage("s0185");
            }
            else
            {
                playerMedicalButton.textLabel.text = LanguageConfigManager.Instance.getLanguage("s0184");
            }
        }
        else
        {
            playerCardImage.gameObject.SetActive(false);
            playerHpNum.text  = "";
            playerExpNum.text = "";
            playerLv.text     = "";
            player_expbar.reset();
            player_hpbar.reset();
            playerCardName.text = "";
            playerCombat.text   = "";
        }
    }
コード例 #15
0
    /// <summary>
    /// 更新的得分bar
    /// </summary>
    public void updateBar()
    {
        //int max = GuildFightSampleManager.Instance().getMaxScore();
        int my  = getGuildScore();
        int max = GuildFightSampleManager.Instance().getNextScore(my);

        scoreBarCtrl.updateValue(my, max);
        scoreBarLabel.text = my + "/" + max;
        nowLabel.text      = GuildFightSampleManager.Instance().getJudgeString(my) + LanguageConfigManager.Instance.getLanguage("GuildArea_96");
        nextLabel.text     = GuildFightSampleManager.Instance().getJudgeString(max) + LanguageConfigManager.Instance.getLanguage("GuildArea_96");
    }
コード例 #16
0
    void updateAlternateInfo()
    {
        if (alternate != null)
        {
            alternateCardName.text = alternate.card.getName();
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + alternate.card.getImageID(), alternateCardImage);

            alternate_hpbar.updateValue(alternate.getHp(), alternate.getHpMax());
            int per = (int)(alternate.getHp() * 100 / alternate.getHpMax());
            if (per == 0)
            {
                per++;
            }
            alternateHpNum.text  = per + "%";
            alternateLv.text     = "Lv." + alternate.getLevel() + "";
            alternateCombat.text = alternate.card.getCardCombat() + "";
//			alternate_expbar.updateValue (alternate.card.getEXP (), alternate.card.getEXPUp ());
            alternate_expbar.updateValue(EXPSampleManager.Instance.getNowEXPShow(alternate.card.getEXPSid(), alternate.card.getEXP())
                                         , EXPSampleManager.Instance.getMaxEXPShow(alternate.card.getEXPSid(), alternate.card.getEXP()));

            per = (int)(EXPSampleManager.Instance.getNowEXPShow(alternate.card.getEXPSid(), alternate.card.getEXP()) * 100 / EXPSampleManager.Instance.getMaxEXPShow(alternate.card.getEXPSid(), alternate.card.getEXP()));
            if (per == 0)
            {
                per++;
            }
            alternateExpNum.text = per + "%";
            //0<hp<max
            alternateMedicalButton.gameObject.SetActive(true);
            if (alternate.getHp() == alternate.getHpMax())
            {
                alternateMedicalButton.gameObject.SetActive(false);
            }
            if (alternate.getHp() == 0)
            {
                alternateMedicalButton.textLabel.text = LanguageConfigManager.Instance.getLanguage("s0185");
            }
            else
            {
                alternateMedicalButton.textLabel.text = LanguageConfigManager.Instance.getLanguage("s0184");
            }
        }
        else
        {
            alternateCardImage.gameObject.SetActive(false);
            alternateHpNum.text  = "";
            alternateExpNum.text = "";
            alternateLv.text     = "";
            alternate_expbar.reset();
            alternate_hpbar.reset();
            alternateCardName.text = "";
            alternateCombat.text   = "";
        }
    }
コード例 #17
0
 public void updateValue(float old, float inc, float max)
 {
     this.now = old + inc;
     this.max = max;
     frontBar.reset();
     incBar.reset();
     if (now != incBar.getNewValue())
     {
         frontBar.updateValue(old, max);
         isActive = true;
     }
 }
コード例 #18
0
 void updateMountsPve()
 {
     mountsPveBar.updateValue(UserManager.Instance.self.getStorePvEPoint(), UserManager.Instance.self.getStorePvEPointMax());
     mountsPveValue.text = UserManager.Instance.self.getStorePvEPoint() + "/" + UserManager.Instance.self.getStorePvEPointMax();
     if (!UserManager.Instance.self.isPveMax() || UserManager.Instance.self.isStorePveMax())
     {
         mountsPveTimeLabel.gameObject.SetActive(false);
     }
     else
     {
         mountsPveTimeLabel.gameObject.SetActive(true);
         mountsPveTimeLabel.text = UserManager.Instance.getNextMountsPveTime().Substring(3);
     }
 }
コード例 #19
0
    public void Initialize(Skill _skill, Card _card)
    {
        showSkill = _skill;
        card      = _card;
        //nameLabel.text = (showSkill.getSkillQuality () == 1 ? "[FFFFFF]" : QualityManagerment.getQualityColor (showSkill.getSkillQuality ())) + showSkill.getName ();
        nameLabel.text = showSkill.getName();
        ResourcesManager.Instance.LoadAssetBundleTexture(_skill.getIcon(), icon);
        ExpLabel.text = EXPSampleManager.Instance.getExpBarShow(showSkill.getEXPSid(), showSkill.getEXP());

        descriptLabel.text = _skill.getDescribe();
        if (_skill.getShowType() != 1 || _skill.getMaxLevel() == 0)
        {
            expbar.gameObject.SetActive(false);
            levelLabel.text = "";
        }
        else
        {
            expbar.gameObject.SetActive(true);
            expbar.updateValue(showSkill.getEXP() - showSkill.getEXPDown(), showSkill.getEXPUp() - showSkill.getEXPDown());
            levelLabel.text = "Lv." + showSkill.getLevel();
        }
        //expbar.updateValue (showSkill.getEXP () - showSkill.getEXPDown (), showSkill.getEXPUp () - showSkill.getEXPDown ());
    }
コード例 #20
0
ファイル: TaskWindow.cs プロジェクト: xiney1986/SDKProject
 public void updateGuildPve()
 {
     if (guild != null && instance.isGuildFightOpen())
     {
         guildPveBar.gameObject.SetActive(true);
         int power    = UserManager.Instance.self.guildFightPower;
         int powerMax = UserManager.Instance.self.guildFightPowerMax;
         guildPveBar.updateValue(power, powerMax);
         guildPveValue.text = power + "/" + powerMax;
     }
     else
     {
         guildPveBar.gameObject.SetActive(false);
     }
 }
コード例 #21
0
    private void updateBar()
    {
        if (!isActive)
        {
            return;
        }
        float incNewData = frontBar.getNewValue() / frontBar.getMaxValue();

        if (Mathf.Abs(incNewData - currentBarValue) < 0.005f)
        {
            currentBarValue = incNewData;
            isActive        = false;
            incBar.updateValue(now, max);
        }
        if (incNewData != currentBarValue)
        {
            currentBarValue = Mathf.Lerp(currentBarValue, incNewData, Time.deltaTime * 10);
        }
    }
コード例 #22
0
    /**更新一些基础信息 */
    private void update_baseInfo()
    {
        LanguageConfigManager lang = LanguageConfigManager.Instance;
        User user = UserManager.Instance.self;

        UserManager.Instance.setSelfHeadIcon(UI_Head);
        UI_VIPIcon.gameObject.SetActive(user.vipLevel > 0);
        if (UI_VIPIcon.gameObject.activeSelf)
        {
            UI_VIPIcon.spriteName = "vip" + user.vipLevel;
        }
        UI_Name.text           = lang.getLanguage("pvpPlayerWindow01") + user.nickname;
        UI_Medal.text          = LaddersConfigManager.Instance.config_Title.M_getTitle(UserManager.Instance.self.prestige).name;
        UI_StarIcon.spriteName = HoroscopesManager.Instance.getStarByType(user.star).getSpriteName();
        UI_StarLabel.text      = HoroscopesManager.Instance.getStarByType(user.star).getName();
        UI_LevelLabel.text     = "LV." + user.getUserLevel();
        UI_LevelSlider.updateValue(user.getLevelExp(), user.getLevelAllExp());
        updatePVE_PVP();
    }
コード例 #23
0
    private void updataBar()
    {
        int numm = UserManager.Instance.self.getPvPPoint();

        for (int i = 0; i < pvpSprits.Length; i++)
        {
            if (i < numm)
            {
                pvpSprits[i].SetActive(true);
            }
            else
            {
                pvpSprits[i].SetActive(false);
            }
        }
        pveBar.gameObject.SetActive(true);
        pveBar.updateValue(UserManager.Instance.self.getPvEPoint(), UserManager.Instance.self.getPvEPointMax());
        pveValue.text = UserManager.Instance.self.getTotalPvEPoint() + "/" + UserManager.Instance.self.getPvEPointMax();
    }
コード例 #24
0
 public void updateUI(string uid, string server, string guildName, float curBoll, float MaxBoll)
 {
     this.uid       = uid;
     this.server    = server;
     this.guildName = guildName;
     this.selfCurbo = curBoll;
     this.selfMaxBo = MaxBoll;
     setTitle(Language("GuildArea_56", guildName + "." + server));
     inspireSample   = GuildFightSampleManager.Instance().getSampleBySid <GuildBuffSample> (GuildFightSampleManager.INSPIRE_SID);
     wishSample      = GuildFightSampleManager.Instance().getSampleBySid <GuildBuffSample> (GuildFightSampleManager.WISH_SID);
     challengeSample = GuildFightSampleManager.Instance().getSampleBySid <GuildFightChallengeSample> (GuildFightSampleManager.CHALLENGE_SID);
     if (uid == GuildManagerment.Instance.getGuild().uid)
     {
         type = SELF;
     }
     else
     {
         type = OTHER;
         bloodCtrl.updateValue(selfCurbo, selfMaxBo);
     }
     getAreaInfo(uid, server);
 }
コード例 #25
0
    public void initInfo(EnumSweep type)
    {
        int vipMinLevel = 0;

        if (type == EnumSweep.fuben)
        {
            vipMinLevel  = SweepConfigManager.Instance.skipStoryVipMinLevel;
            vipInfo.text = LanguageConfigManager.Instance.getLanguage("s0155lll1", vipMinLevel.ToString());
        }
        else if (type == EnumSweep.boss)
        {
            vipMinLevel  = SweepConfigManager.Instance.skipBossVipMinLevel;
            vipInfo.text = LanguageConfigManager.Instance.getLanguage("s0155lll6", vipMinLevel.ToString());
        }
        //vipInfo.text=LanguageConfigManager.Instance.getLanguage("s0155lll1",vipMinLevel.ToString());
        int viplvv = UserManager.Instance.self.getVipLevel();

        if (viplvv == 0)
        {
            vipIcon.gameObject.SetActive(false);
            vipLv.gameObject.SetActive(true);
        }
        else
        {
            vipIcon.gameObject.SetActive(true);
            vipLv.gameObject.SetActive(false);
            vipIcon.spriteName = "vip" + UserManager.Instance.self.getVipLevel().ToString();
        }
        float exp1 = (float)UserManager.Instance.self.getVipEXP();
        float exp2 = (float)UserManager.Instance.self.getVipEXPDown(vipMinLevel);

        VipBar.updateValue(exp1, exp2);
        value.text     = exp1.ToString() + "/" + exp2.ToString();
        needMoney.text = LanguageConfigManager.Instance.getLanguage("s0155lll2", getNeedVipRMB(type).ToString(), vipMinLevel.ToString());        //getNeedVipRMB(type).ToString();
        MaskWindow.UnlockUI();
    }
コード例 #26
0
ファイル: ButtonSkill.cs プロジェクト: xiney1986/SDKProject
    //_type 指定的话,一般用于skill为空的时候
    public void initSkillData(Skill data, int _state, int _type)
    {
        skillData  = data;
        skillState = _state;
        if (_type != -1)
        {
            skillType = _type;
        }
        else
        {
            skillType = TYPE_YELLOW;
        }
        if (skillData != null)
        {
            skillType = skillData.getSkillStateType();
            if (skillState == STATE_BEAST)
            {
                int mainSkillLv = EXPSampleManager.Instance.getLevel(EXPSampleManager.SID_HALLOW_EXP, exp);
                if (mainSkillLv == 0)
                {
                    mainSkillLv = 1;
                }
                if (mainSkillLv >= skillData.getMaxLevel())
                {
                    mainSkillLv = skillData.getMaxLevel();
                }
                skillLevel.text = "Lv." + mainSkillLv;
            }
            else
            {
//				skillLevel.text = "Lv." + Mathf.Min (skillData.getMaxLevel (), (owner == null ? skillData.getLevel () : owner.getLevel () + 5));
                if (skillData.getShowType() != 1 || skillData.getMaxLevel() == 0)
                {
                    skillLevel.text = "";
                }
                else
                {
                    skillLevel.text = "Lv." + skillData.getLevel();
                }
            }
            //textLabel.text =(skillData.getSkillQuality () == 1?"[FFFFFF]": QualityManagerment.getQualityColor (skillData.getSkillQuality ())) + skillData.getName ();
            textLabel.text = skillData.getName();
            ResourcesManager.Instance.LoadAssetBundleTexture(skillData.getIcon(), icon);

            //下面的代码不能乱走滴
            if (fatherWindow is BeastSummonShowWindow || fatherWindow is BeastAttrLevelInfo)
            {
                return;
            }
            if (skillDesc != null)         //被动技不显示描述
            {
                skillDesc.text = skillData.getDescribe();
            }
            if (expbar != null)         //被动技不显示进度
            {
                expbar.gameObject.SetActive(true);
                expLabel.gameObject.SetActive(true);
                expbar.updateValue(skillData.getEXP() - skillData.getEXPDown(), skillData.getEXPUp() - skillData.getEXPDown());
                expLabel.text = (skillData.getEXP() - skillData.getEXPDown()) + "/" + (skillData.getEXPUp() - skillData.getEXPDown());

                if (fatherWindow is CardBookWindow)
                {
                    int showType = (fatherWindow as CardBookWindow).getShowType();
                    if (showType == CardBookWindow.CHATSHOW || showType == CardBookWindow.CLICKCHATSHOW)
                    {
                        expbar.gameObject.SetActive(false);
                        expLabel.gameObject.SetActive(false);
                    }
                }
                else if (fatherWindow is CardPictureWindow)
                {
                    expbar.gameObject.SetActive(false);
                    expLabel.gameObject.SetActive(false);
                }
            }
        }
        else
        {
            skillLevel.text = "";
            textLabel.text  = "";

            if (skillType == TYPE_RED)
            {
                ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.SKILLIMAGEPATH + "Skill_Null", icon);
            }
            else if (skillType == TYPE_YELLOW)
            {
                ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.SKILLIMAGEPATH + "Skill_Null", icon);
            }
            else if (skillType == TYPE_BLUE)
            {
                ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.SKILLIMAGEPATH + "Skill_Null", icon);
            }
        }

        if (skillState == STATE_CANLEARN)
        {
            if (learIcon != null)
            {
                learIcon.gameObject.SetActive(true);
            }
        }
        else if (skillState == STATE_NOOPEN)
        {
            gameObject.SetActive(false);
        }

//		if (background != null) {
//			if (skillType == TYPE_BLUE)
//				background.color = Color.blue;
//			else if (skillType == TYPE_RED)
//				background.color = Color.red;
//			else
//				background.color = Color.yellow;
//		}
    }
コード例 #27
0
ファイル: EventObjCtrl.cs プロジェクト: xiney1986/SDKProject
 public void setBossHP(float nowHp, float maxHp)
 {
     createBar();
     hpBar.updateValue(nowHp, maxHp);
 }
コード例 #28
0
    public void init(Award[] awards)
    {
        this.awards   = awards;
        AwardItems    = new List <GameObject> ();
        BoxAwardItems = new List <GameObject> ();
        User user = UserManager.Instance.self;

        if (HeroRoadManagerment.Instance.currentHeroRoad == null && MissionInfoManager.Instance.isTowerFuben())
        {
            int deadNum = MissionInfoManager.Instance.mission.deadNum;
            if (deadNum >= 0 && deadNum <= 2)
            {
                ResourcesManager.Instance.LoadAssetBundleTexture("texture/missionComplete/missioComplete_S", ratingLevel, (obj) => {
                    setRatingLevelActive(false);
                });
            }
            else if (deadNum >= 3 && deadNum <= 5)
            {
                ResourcesManager.Instance.LoadAssetBundleTexture("texture/missionComplete/missioComplete_A", ratingLevel, (obj) => {
                    setRatingLevelActive(false);
                });
            }
            else if (deadNum >= 5 && deadNum <= 10)
            {
                ResourcesManager.Instance.LoadAssetBundleTexture("texture/missionComplete/missioComplete_B", ratingLevel, (obj) => {
                    setRatingLevelActive(false);
                });
            }
            else
            {
                ResourcesManager.Instance.LoadAssetBundleTexture("texture/missionComplete/missioComplete_C", ratingLevel, (obj) => {
                    setRatingLevelActive(false);
                });
            }
            //新手其间强制给S级
            if (GuideManager.Instance.isLessThanStep(GuideGlobal.NEWOVERSID))
            {
                ResourcesManager.Instance.LoadAssetBundleTexture("texture/missionComplete/missioComplete_S", ratingLevel, (obj) => {
                    setRatingLevelActive(false);
                });
            }
        }
        aw = null;
        //box
        aw = getAwardByType(AwardManagerment.MNGV);
        if (aw != null)
        {
            CreateGoodsByAward(BoxAwardItems, aw);
        }
        //first
        Award firstAward = getAwardByType(AwardManagerment.FIRST);
        //fuben
        Award fubenAward = getAwardByType(AwardManagerment.FB_END);

        aw = Award.mergeAward(firstAward, fubenAward);

        if (aw != null)
        {
            moneyGap = aw.moneyGap > 0 ? aw.moneyGap : 0;
            expGap   = aw.expGap > 0 ? aw.expGap : 0;
            honorGap = aw.honorGap > 0 ? aw.honorGap : 0;
            rmbGap   = aw.rmbGap > 0 ? aw.rmbGap : 0;
            if (rmbGap > 0)
            {
                moneyIcon.spriteName = "rmb";
            }
            starGap = aw.starGap;
            CreateGoodsByAward(AwardItems, aw);
        }
        SortAwardItem(AwardItems);
        SortAwardItem(BoxAwardItems);
        for (int i = 0; i < AwardItems.Count; i++)
        {
            GameObject obj = AwardItems [i];
            obj.transform.parent        = AwardItemsContent.transform;
            obj.transform.localPosition = new Vector3(i * 94, 0, 0);
            obj.transform.localScale    = new Vector3(0.7f, 0.7f, 1);
        }
        for (int i = 0; i < BoxAwardItems.Count; i++)
        {
            GameObject obj = BoxAwardItems [i];
            obj.transform.parent        = BoxAwardItemsContent.transform;
            obj.transform.localPosition = new Vector3(i * 94, 0, 0);
            obj.transform.localScale    = new Vector3(0.7f, 0.7f, 1);
        }
        //user
//		if (aw != null && aw.playerLevelUpInfo != null) {
//			userLevel.text = "Lv" + aw.playerLevelUpInfo.oldLevel;
//			expbarCtrl.GetComponent<UISlider> ().value = Mathf.Max (0.1f, (float)aw.playerLevelUpInfo.oldExp / aw.playerLevelUpInfo.oldExpUp);
//		} else {
        userLevel.text = "Lv." + user.getUserLevel();
        expbar.updateValue(UserManager.Instance.self.getLevelExp(), UserManager.Instance.self.getLevelAllExp());
        expbarLabel.text = UserManager.Instance.self.getLevelExp() + "/" + UserManager.Instance.self.getLevelAllExp();
//		}

        if (HeroRoadManagerment.Instance.currentHeroRoad != null)
        {
            isHeroRoad = true;
            GameObject heroRoadAwardObj = Instantiate(heroRoadAwardPrefab) as GameObject;
            heroRoadAwardObj.transform.parent        = heroRoadObj.transform;
            heroRoadAwardObj.transform.localPosition = Vector3.zero;
            heroRoadAwardObj.transform.localScale    = Vector3.one;
            heroRoadAwardContent = heroRoadAwardObj.GetComponent <HeroRoadAwardContent> ();
            heroRoadAwardContent.initHeroRoad(honorGap, rmbGap);
            heroRoadAwardContent.closeButton.GetComponent <ButtonBase> ().setFatherWindow(this);
        }
        else if (MissionInfoManager.Instance.isTowerFuben())
        {
            isTower = true;
            GameObject towerAwardObj = Instantiate(towerAwardPerfab) as GameObject;
            towerAwardObj.transform.parent        = towerObj.transform;
            towerAwardObj.transform.localPosition = Vector3.zero;
            towerAwardObj.transform.localScale    = Vector3.one;
            towerAwardContent = towerAwardObj.GetComponent <TowerAwardContent>();
            towerAwardContent.initTowerAward(firstAward, fubenAward, this);
            towerAwardContent.closeButton.GetComponent <ButtonBase>().setFatherWindow(this);
        }
    }
コード例 #29
0
 /// <summary>
 /// 更新行动力
 /// </summary>
 public void updatePower()
 {
     warPowerCtrl.updateValue(UserManager.Instance.self.guildFightPower, UserManager.Instance.self.guildFightPowerMax);
     warPowerLabel.text = UserManager.Instance.self.guildFightPower + "/" + UserManager.Instance.self.guildFightPowerMax;
     bloodCtrl.updateValue(data.curBlood, data.maxBlood);
 }
コード例 #30
0
 private int showTypeNum;       //你从哪里来
 /// <summary>
 /// 初始化
 /// </summary>
 public void init(WindowBase wb, Equip eq, int part, int showType)
 {
     selectEquip = eq;
     clickButton.fatherWindow = wb;
     showTypeNum = showType;
     if (eq == null)
     {
         eqName.text = LanguageConfigManager.Instance.getLanguage("resonanceWindow02");
         eqIcon.gameObject.SetActive(false);
         eqbg.gameObject.SetActive(false);
         lvBar.updateValue(0, 1);
         eqlLabel.text = "";
         clickButton.disableButton(false);//点击事件和装备强化界面绑定
         clickButton.onClickEvent = intoNoShowInf;
         partt.gameObject.SetActive(true);
         if (part == EquipPartType.WEAPON)
         {
             partt.spriteName = "icon_back_weapon";
         }
         else if (part == EquipPartType.ARMOUR)
         {
             partt.spriteName = "icon_back_armor";
         }
         else if (part == EquipPartType.SHOSE)
         {
             partt.spriteName = "icon_back_shose";
         }
         else if (part == EquipPartType.HELMET)
         {
             partt.spriteName = "icon_back_hat";
         }
         else if (part == EquipPartType.RING)
         {
             partt.spriteName = "icon_back_ring";
         }
         if (showTypeNum == CardBookWindow.CLICKCHATSHOW)
         {
             clickButton.disableButton(true);
             this.transform.FindChild("button").gameObject.GetComponent <Collider>().enabled = false;
         }
     }
     else
     {
         partt.gameObject.SetActive(false);
         eqIcon.gameObject.SetActive(true);
         eqbg.gameObject.SetActive(true);
         eqName.text = QualityManagerment.getQualityColor(selectEquip.getQualityId()) + selectEquip.getName();
         ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + selectEquip.getIconId(), eqIcon);
         eqbg.spriteName = QualityManagerment.qualityIDToIconSpriteName(selectEquip.getQualityId());
         lvBar.updateValue(selectEquip.getLevel(), selectEquip.getMaxLevel());
         eqlLabel.text = selectEquip.getLevel() + "/" + selectEquip.getMaxLevel();
         clickButton.disableButton(false);
         if (showTypeNum == CardBookWindow.CLICKCHATSHOW)
         {
             clickButton.disableButton(true);
             this.transform.FindChild("button").gameObject.GetComponent <Collider>().enabled = false;
         }
         else
         {
             clickButton.onClickEvent = intoShowInf;//点击事件和装备强化界面绑定
         }
     }
 }