private void BindSkill(string skill, ObserveHeroSkill skillComp) { try { SysSkillMainVo skillData = SkillUtility.GetSkillData(skill, -1, -1); string skill_icon = skillData.skill_icon; Texture mainTexture = ResourceManager.Load <Texture>(skill_icon, true, true, null, 0, false); skillComp.Texture.mainTexture = mainTexture; if (skillComp.Level) { int skillLevel = this._hero.skillManager.GetSkillLevel(skill); skillComp.Level.text = skillLevel.ToString(); } float num = 0f; float skillCDTime = this._hero.GetSkillCDTime(skill); if (skillCDTime > 0f) { num = this._hero.GetCDTime(skill) / skillCDTime; } skillComp.Mask.fillAmount = num; this.SetMaskEnableStatus(skillComp.Mask, num); } catch (Exception e) { ClientLogger.LogException(e); } }
public static SysSkillMainVo GetSkillData(string skillID, int level = -1, int skin = -1) { SysSkillMainVo skillMainData = BaseDataMgr.instance.GetSkillMainData(skillID); SysSkillLevelupVo skillLevelupData = SkillUtility.GetSkillLevelupData(skillID, level); SysSkillSkinVo skillSkinData = SkillUtility.GetSkillSkinData(skillID, skin); return(SkillUtility.GetSkillData(skillMainData, skillLevelupData, skillSkinData)); }
private void OnPassiveItemChanged(BuffItem item, int dataIndex) { string text = this.passive_skills[dataIndex]; SysSkillMainVo skillData = SkillUtility.GetSkillData(text, -1, -1); item.name = text; item.SetTexture(skillData.skill_icon); }
public SkillData(string skill_id) { this.skillId = skill_id; this.config = SkillUtility.GetSkillData(this.skillId, -1, -1); if (this.config == null) { return; } this.Parse(this.config); }
public void Init(int idx, string idxName, UIAtlas atlas) { this.skillIndex = idx + SkillIndex._1st; this.skillFrame.spriteName = "Hero_skill_frame"; SysSkillMainVo skillData = SkillUtility.GetSkillData(idxName, -1, -1); this.skillPic.atlas = atlas; this.skillPic.spriteName = skillData.skill_icon; UIEventListener.Get(this.skillFrame.gameObject).onMobileHover = new UIEventListener.BoolDelegate(this.CheckState); }
public SkillData(string skill_id, int level, int skin) { SysSkillMainVo skillData = SkillUtility.GetSkillData(skill_id, level, skin); this.skillId = skill_id; this.config = skillData; if (this.config == null) { return; } this.Parse(this.config); }
private void UpdateSkills() { for (int i = 0; i < this.mSkillIds.Count; i++) { SysSkillMainVo skillData = SkillUtility.GetSkillData(this.mSkillIds[i], -1, -1); UITexture component = this.SkillIcons.GetChild(i).GetComponent <UITexture>(); component.name = this.mSkillIds[i]; string skill_icon = skillData.skill_icon; Texture mainTexture = ResourceManager.Load <Texture>(skill_icon, true, true, null, 0, false); component.mainTexture = mainTexture; } }
public void UpdateSkillStudy() { Units player = PlayerControlMgr.Instance.GetPlayer(); SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(player.npc_id); string[] heroSkills = heroMainData.skill_id.Split(new char[] { ',' }); GridHelper.FillGrid <SkillShowItem>(this.mSkillGird, this.mSkillItem, (heroSkills.Length <= 4) ? heroSkills.Length : 4, delegate(int idx, SkillShowItem comp) { SysSkillMainVo skillData = SkillUtility.GetSkillData(heroSkills[idx], -1, -1); Texture textue = null; string type = (skillData.skill_trigger != 3) ? "(主动)" : "(被动)"; string unikey = skillData.skill_id + "_lv0" + ((player.getSkillById(skillData.skill_id).skillLevel != 0) ? player.getSkillById(skillData.skill_id).skillLevel : 1).ToString(); SysSkillLevelupVo dataById = BaseDataMgr.instance.GetDataById <SysSkillLevelupVo>(unikey); comp.Init(textue, skillData.skill_name, type, SkillView.FixSkillTxtInfo(BaseDataMgr.instance.GetLanguageData(dataById.skill_description).content, player), !player.skillManager.IsSkillUnlock(skillData.skill_id), (dataById.cd / (1f + player.GetAttr(AttrType.NormalSkillCooling))).ToString("0.0")); }); this.mSkillGird.Reposition(); }
private void ChangeSkillText(int index) { SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(this.heroNPC); string[] AllSkillName = heroMainData.skill_id.Split(new char[] { ',' }); SysSkillMainVo skillData = SkillUtility.GetSkillData(AllSkillName[index - 1], -1, -1); this.skillName.text = LanguageManager.Instance.GetStringById(skillData.skill_name); this.skillDescription.text = LanguageManager.Instance.GetStringById(skillData.skill_description); if (skillData.skill_trigger == 3) { this.activeSkill.gameObject.SetActive(false); this.passiveSkill.gameObject.SetActive(true); this.passiveSkill.text = LanguageManager.Instance.GetStringById("HeroAltar_Passive"); } else { this.activeSkill.gameObject.SetActive(true); this.passiveSkill.gameObject.SetActive(false); this.DealWithActiveSkill(AllSkillName[index - 1]); } SysSkillDescVo dataById = BaseDataMgr.instance.GetDataById <SysSkillDescVo>(AllSkillName[index - 1] + "_lv01"); SysSkillLevelupVo dataById2 = BaseDataMgr.instance.GetDataById <SysSkillLevelupVo>(AllSkillName[index - 1] + "_lv01"); this.Lv4.gameObject.SetActive(4 == dataById2.skill_levelmax); for (int num = 0; num != this.skillEffectGrid.transform.childCount; num++) { this.skillEffectGrid.transform.GetChild(num).gameObject.SetActive(true); } GridHelper.FillGrid <PropViewSkillEffect>(this.skillEffectGrid, this.skillEffect, (dataById != null) ? dataById.effect_num : 0, delegate(int idx, PropViewSkillEffect comp) { comp.name = index.ToString(); comp.Init(AllSkillName[index - 1], idx); }); this.skillEffectGrid.Reposition(); }