/// <summary> /// 更新拥有形象(强化等级,进阶等级,形象,形象背景) /// </summary> private void updateCommonInfo() { if (magicWeapon.getPhaseLv() > 0) { phaseLv.gameObject.SetActive(true); phaseLv.text = "+" + magicWeapon.getPhaseLv().ToString(); } else { phaseLv.gameObject.SetActive(false); } magicName.text = QualityManagerment.getQualityColor(magicWeapon.getMagicWeaponQuality()) + magicWeapon.getName(); ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + magicWeapon.getIconId(), icon); strengLv.text = "Lv." + magicWeapon.getStrengLv().ToString() + "/" + magicWeapon.getMaxStrengLv().ToString(); 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); } updateAttrChanges(); updateSkills(); }