Пример #1
0
 public void Init(SkillDataItem skillData)
 {
     this.S_skillDataItem       = skillData;
     this.S_Name.text           = skillData.Name;
     this.S_Texture.mainTexture = skillData.Texture;
     if (skillData.SummonerGrade < skillData.UnclockGrade)
     {
         this.S_Texture.material = CharacterDataMgr.instance.ReturnMaterialType(9);
     }
     else
     {
         this.S_Texture.material = CharacterDataMgr.instance.ReturnMaterialType(1);
     }
     UIEventListener.Get(base.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickSummonerSkillItem);
 }
Пример #2
0
        private List <SkillDataItem> GetSummonerSkillList()
        {
            List <SkillDataItem>        list      = new List <SkillDataItem>();
            Dictionary <string, object> dicByType = BaseDataMgr.instance.GetDicByType <SysSummonersSkillVo>();
            int userLevel = CharacterDataMgr.instance.GetUserLevel(ModelManager.Instance.Get_userData_filed_X("Exp"));

            for (int i = 0; i < dicByType.Keys.Count; i++)
            {
                SysSummonersSkillVo dataById      = BaseDataMgr.instance.GetDataById <SysSummonersSkillVo>(dicByType.Keys.ElementAt(i));
                SysSkillMainVo      skillMainData = BaseDataMgr.instance.GetSkillMainData(dataById.skill_id);
                SkillDataItem       item          = new SkillDataItem(dataById.id.ToString(), userLevel, dataById.level_limit, LanguageManager.Instance.GetStringById(skillMainData.skill_name), ResourceManager.Load <Texture>(skillMainData.skill_icon, true, true, null, 0, false));
                list.Add(item);
            }
            return(list);
        }
        private List <SkillDataItem> GetSkillListData(string battleId)
        {
            List <SkillDataItem> list     = new List <SkillDataItem>();
            SysBattleSceneVo     dataById = BaseDataMgr.instance.GetDataById <SysBattleSceneVo>(battleId);
            int userLevel = CharacterDataMgr.instance.GetUserLevel(ModelManager.Instance.Get_userData_filed_X("Exp"));

            string[] array = dataById.summoners_skill.Split(new char[]
            {
                ','
            });
            for (int i = 0; i < array.Length; i++)
            {
                SysSummonersSkillVo dataById2     = BaseDataMgr.instance.GetDataById <SysSummonersSkillVo>(array[i]);
                SysSkillMainVo      skillMainData = BaseDataMgr.instance.GetSkillMainData(dataById2.skill_id);
                SkillDataItem       item          = new SkillDataItem(dataById2.id.ToString(), userLevel, dataById2.level_limit, LanguageManager.Instance.GetStringById(skillMainData.skill_name), ResourceManager.Load <Texture>(skillMainData.skill_icon, true, true, null, 0, false));
                list.Add(item);
            }
            return(list);
        }