/// <summary> /// 刷新翅膀技能 by鲁家旗 /// </summary> /// <param name="_skillId"></param> void RefreshWingSkillSp(int _skillId) { if (wingSkillGo != null) { wingSkillGo.SetActive(true); } SkillMainConfigRef skill = ConfigMng.Instance.GetSkillMainConfigRef(_skillId); if (skill != null && wingSkillSp != null) { wingSkillSp.spriteName = skill.skillIcon; } SkillLvDataRef skillLv = ConfigMng.Instance.GetSkillLvDataRef(_skillId, 1); if (!wingSkillTipTime.ContainsKey(_skillId) || (skillLv != null && Time.time - wingSkillTipTime[_skillId] > skillLv.cd)) { MessageST mst = new MessageST(); mst.messID = 368; mst.words = new string[2] { GameCenter.wingMng.CurUseWingInfo != null ? GameCenter.wingMng.CurUseWingInfo.WingName : string.Empty, skill.skillName }; GameCenter.messageMng.AddClientMsg(mst); wingSkillTipTime[_skillId] = Time.time; } if (wingFx != null) { wingFx.ShowFx(); } CancelInvoke("HideSkillSp"); Invoke("HideSkillSp", 3.5f); }
/// <summary> /// 试用翅膀到期 /// </summary> void ChooseWingGo() { if (GameCenter.wingMng.WingDic.Count != 0) { GameCenter.uIMng.ReleaseGUI(GUIType.TRIALWING); GameCenter.uIMng.SwitchToUI(GUIType.NONE); return; } GameCenter.wingMng.C2S_RequestChangeWing(WingRef.id, false); starGo.SetActive(false); endGo.SetActive(true); using (var info = Dic.GetEnumerator()) { while (info.MoveNext()) { if (nameLabel != null) { nameLabel.text = "[b]" + info.Current.Value.name; } for (int i = 0; i < attriNextLabel.Count; i++) { AttributeTypeRef attributeRef = ConfigMng.Instance.GetAttributeTypeRef((ActorPropertyTag)Enum.ToObject(typeof(ActorPropertyTag), info.Current.Value.property_list[i].eid)); if (attriNextLabel[i] != null) { attriNextLabel[i].text = attributeRef == null ? string.Empty : attributeRef.stats; } if (attriNextNum[i] != null) { attriNextNum[i].text = "+" + info.Current.Value.property_list[i].count.ToString(); } } WingRef wingRef = ConfigMng.Instance.GetWingRef(info.Current.Value.id, ConfigMng.Instance.GetWingMaxLev(info.Current.Value.id)); if (wingRef != null && skillSP != null) { SkillMainConfigRef skillRef = ConfigMng.Instance.GetSkillMainConfigRef(wingRef.passivity_skill.skillid); skillSP.spriteName = skillRef == null ? string.Empty : skillRef.skillIcon; } if (skillDes != null) { skillDes.text = info.Current.Value.not_active_skill; } //if (model != null) //{ // model.configID = wingRef.itemui; // model.lookRotation = 360; // model.StartLoad(); //} if (wingTex != null) { GameCenter.previewManager.TryPreviewSingleEquipment(new EquipmentInfo(wingRef.itemui, EquipmentBelongTo.PREVIEW), wingTex); } return; } } }
void Refresh() { if (GameCenter.skillMng.NewSkillList.Count < 1) { return; } if (skillSprite != null) { skillSprite.spriteName = GameCenter.skillMng.NewSkillList[0].SkillIcon; } if (skillName != null) { skillName.text = GameCenter.skillMng.NewSkillList[0].SkillName; } if (skillDes != null) { SkillMainConfigRef Ref = ConfigMng.Instance.GetSkillMainConfigRef(GameCenter.skillMng.NewSkillList[0].SkillID); if (Ref != null) { skillDes.text = Ref.skillRes.Replace("\\n", "\n"); } } }
public void SetWingNotActiveUI(WingRef _info) { data = _info; if (desNameLabel != null) { desNameLabel.text = _info.name; } if (attribuDes != null) { attribuDes.text = _info.des; } if (skillLabel != null) { skillLabel.text = _info.skill_des; } if (skillDes != null) { skillDes.text = _info.not_active_skill; } //技能图片 WingRef wingRef = ConfigMng.Instance.GetWingRef(_info.id, ConfigMng.Instance.GetWingMaxLev(_info.id)); int skillId = 0; if (wingRef != null) { skillId = wingRef.passivity_skill.skillid; } SkillMainConfigRef skillRef = ConfigMng.Instance.GetSkillMainConfigRef(skillId); if (skillIcon != null) { skillIcon.spriteName = skillRef == null ? string.Empty : skillRef.skillIcon; skillIcon.IsGray = UISpriteEx.ColorGray.Gray; } //消耗 第一个翅膀的开启条件不同只需消耗材料 if (_info.id == 1) { if (ConfigMng.Instance.GetEquipmentRef(_info.condition_2[0]) != null) { string[] name = new string[2] { GameHelper.GetStringWithBagNumber(_info.condition_2[0], (ulong)_info.condition_2[1]), string.Empty }; if (conditionLabel[0] != null) { conditionLabel[0].text = ConfigMng.Instance.GetUItext(6, name); } if (conditionLabel[1] != null) { conditionLabel[1].gameObject.SetActive(false); } } } else { if (conditionLabel[1] != null) { conditionLabel[1].gameObject.SetActive(true); } if (ConfigMng.Instance.GetWingRef(_info.condition_1[0], 1) != null) { string[] name = new string[2] { ConfigMng.Instance.GetWingRef(_info.condition_1[0], 1).name, _info.condition_1[1].ToString() }; if (conditionLabel[0] != null) { conditionLabel[0].text = ConfigMng.Instance.GetUItext(7, name); } } if (ConfigMng.Instance.GetEquipmentRef(_info.condition_2[0]) != null) { string[] conname = new string[2] { GameHelper.GetStringWithBagNumber(_info.condition_2[0], (ulong)_info.condition_2[1]), string.Empty }; if (conditionLabel[1] != null) { conditionLabel[1].text = ConfigMng.Instance.GetUItext(8, conname); } } } }