コード例 #1
0
 /** 显示强化状态 */
 private void ShowPowerState()
 {
     if (starSoul.isMaxLevel() || starSoul.getStarSoulType() == 0)        // 满级以及经验类星魂不显示强化按钮
     {
         gameObject.SetActive(false);
     }
     else
     {
         gameObject.SetActive(true);
         textLabel.text = LanguageConfigManager.Instance.getLanguage("s0012");
     }
 }
コード例 #2
0
    /** 更新UI */
    public void updateUI()
    {
        updateLabel();
        updateStarSoulView();
        reserveExp.text = StarSoulManager.Instance.getStarSoulExp().ToString();
        long needExpforOne = starSoul.getEXPUp() - starSoul.getEXP();
        long needExpforAll = starSoul.getMaxExp() - starSoul.getEXP();

        oneLvExp.text   = LanguageConfigManager.Instance.getLanguage("StarSoulStrengWindow_DecThree", needExpforOne.ToString());
        allLVExp.text   = LanguageConfigManager.Instance.getLanguage("StarSoulStrengWindow_DecFour", needExpforAll.ToString());
        expLabel.text   = EXPSampleManager.Instance.getExpBarShow(starSoul.getEXPSid(), starSoul.getEXP());
        starNameLV.text = starSoul.getName() + " Lv." + starSoul.getLevel();
        string[] str = starSoul.getDescribe().Split('#');
        if (str.Length > 1)
        {
            starInfo1.text = str[0].Split('+')[0] + "[3A9663] +" + str[0].Split('+')[1];
            starInfo.text  = str[1].Split('+')[0] + "[3A9663] +" + str[1].Split('+')[1];
        }
        else
        {
            starInfo1.text = str[0].Split('+')[0] + "[3A9663] +" + str[0].Split('+')[1];
        }
        //starInfo.text = starSoul.getDescribe ().Split('+')[0]+"[3A9663] +"+starSoul.getDescribe().Split('+')[1];
        long storeExp = StarSoulManager.Instance.getStarSoulExp();

        if (storeExp == 0 || starSoul.isMaxLevel())
        {
            allUpButton.disableButton(true);
            oneUpButton.disableButton(true);
        }
        else
        {
            // 升一级需要的经验
            long needExp = starSoul.getEXPUp() - starSoul.getEXP();
            if (storeExp < needExp)
            {
                oneUpButton.disableButton(true);
            }
            else
            {
                oneUpButton.disableButton(false);
            }
            allUpButton.disableButton(false);
        }
    }
コード例 #3
0
    /// <summary>
    /// 更新星魂信息
    /// </summary>
    public void updateStarSoul()
    {
        levelValueLabel.text   = starSoul.getLevel() + "/" + starSoul.getMaxLevel();
        starSoulNameLabel.text = QualityManagerment.getQualityColor(starSoul.getQualityId()) + starSoul.getName();
        long currentLvExp    = EXPSampleManager.Instance.getNowEXPShow(starSoul.getEXPSid(), starSoul.getEXP());
        long currentLvMaxEXP = EXPSampleManager.Instance.getMaxEXPShow(starSoul.getEXPSid(), starSoul.getEXP());

        if (starSoul.isMaxLevel())
        {
            expBar.updateValue(currentLvMaxEXP, currentLvMaxEXP);
        }
        else
        {
            expBar.updateValue(currentLvExp, currentLvMaxEXP);
        }
        expLabel.text = EXPSampleManager.Instance.getExpBarShow(starSoul.getEXPSid(), starSoul.getEXP());
        if (starSoul.checkState(EquipStateType.LOCKED))
        {
            lockSprite.gameObject.SetActive(true);
        }
        else
        {
            lockSprite.gameObject.SetActive(false);
        }
        ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.STARSOUL_ICONPREFAB_PATH + starSoul.getIconId(), starSoulViewPoint.transform, (obj) => {
            GameObject gameObj = obj as GameObject;
            if (gameObj != null)
            {
                Transform childTrans = gameObj.transform;
                if (childTrans != null)
                {
                    StarSoulEffectCtrl effectCtrl = childTrans.gameObject.GetComponent <StarSoulEffectCtrl>();
                    effectCtrl.setColor(starSoul.getQualityId());
                }
            }
        });
        string[] str = starSoul.getDescribe().Split('#');
        if (str.Length > 1)
        {
            attrDescLabel.text  = "[A65644]" + str[0].Replace("+", "[3A9663]+");
            attrDescLabel1.text = "[A65644]" + str[1].Replace("+", "[3A9663]+");
        }
        else
        {
            attrDescLabel1.text = "[A65644]" + str[0].Replace("+", "[3A9663]+");
        }
        int partNum = 0;

        if (currentCard != null)
        {
            partNum = currentCard.getStarSoulsPartNum(starSoul.partId);
        }
        // 刻印暂时没有开放
//		StarSoulSuitSample starSoulSuitSample=starSoul.getStarSoulSuitSample ();
//		int needNum = starSoulSuitSample.parts.Length;
//		if (partNum>=needNum) {
//			// 策划文档上还有个龙之刻印:2分是什么东西???
//			suitDescLabel.text = "[FFFFFF]"+starSoulSuitSample.name+": "+starSoulSuitSample.desc;
//		} else {
//			suitDescLabel.text = "[999999]"+starSoulSuitSample.name+"("+LanguageConfigManager.Instance.getLanguage("StarSoulWindow_Suit_NotAcitve")+"): "+starSoulSuitSample.desc+"("+
//									LanguageConfigManager.Instance.getLanguage("StarSoulWindow_Suit_Acitve_Desc",needNum.ToString())+")";
//		}
    }