示例#1
0
 /// <summary>
 /// 更新拥有形象(强化等级,进阶等级,形象,形象背景)
 /// </summary>
 private void updateCommonInfo()
 {
     if (magicWeapon.getPhaseLv() > 0)
     {
         phaseLv.gameObject.SetActive(true);
         phaseLv.text = "+" + magicWeapon.getPhaseLv().ToString();
     }
     else
     {
         phaseLv.gameObject.SetActive(false);
     }
     towerBar.updateValue((float)magicWeapon.getLuckNumber(), (float)100);
     towerValue.text = magicWeapon.getLuckNumber() + "%";
     magicName.text  = QualityManagerment.getQualityColor(magicWeapon.getMagicWeaponQuality()) + magicWeapon.getName();
     phaseNum.text   = magicWeapon.getPhaseLv() + "/" + magicWeapon.getMaxPhaseLv();
     phaseButton.disableButton(false);
     if (magicWeapon.getPhaseLv() == magicWeapon.getMaxPhaseLv())
     {
         phaseNum.text = LanguageConfigManager.Instance.getLanguage("magicweapLiii03");
         //phaseButton.disableButton(true);
     }
     updateSuccess();
     ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + magicWeapon.getIconId(), icon);
     icon_bg.spriteName = QualityManagerment.qualityIDtoMagicWeapon(magicWeapon.getMagicWeaponQuality());
     if (starPrefab != null)
     {
         Utils.RemoveAllChild(icon.transform);
         int starLevel = MagicWeaponSampleManager.Instance.getMagicWeaponSampleBySid(magicWeapon.sid).starLevel;
         if (starLevel > 0)
         {
             ShowStars show = NGUITools.AddChild(icon.gameObject, starPrefab).GetComponent <ShowStars>();
             show.initStar(starLevel, MagicWeaponManagerment.USEDBUMAGIC_ATTRSHOW);
         }
     }
     //职业显示
     jobType.gameObject.SetActive(true);
     jobBg.gameObject.SetActive(true);
     if (magicWeapon.getMgType() == JobType.POWER)  //力
     {
         jobType.spriteName = "roleType_2s";
     }
     else if (magicWeapon.getMgType() == JobType.MAGIC)    //魔
     {
         jobType.spriteName = "roleType_5s";
     }
     else if (magicWeapon.getMgType() == JobType.AGILE)    //敏
     {
         jobType.spriteName = "roleType_3s";
     }
     else if (magicWeapon.getMgType() == JobType.POISON)    //毒
     {
         jobType.spriteName = "roleType_4s";
     }
     else if (magicWeapon.getMgType() == JobType.COUNTER_ATTACK)    //反
     {
         jobType.spriteName = "roleType_1s";
     }
     else if (magicWeapon.getMgType() == JobType.ASSIST)    //辅
     {
         jobType.spriteName = "roleType_6s";
     }
     else
     {
         jobType.gameObject.SetActive(false);
         jobBg.gameObject.SetActive(false);
     }
     updateSkills();
     updateProp();
 }