private string GetAtlasNameById(EnumAtlasType eAtlasType, int id) { string result = string.Empty; switch (eAtlasType) { case EnumAtlasType.Beast: if (id >= 0 && id <= 40) { result = string.Format("Atlas/BeastIcon/{0}", "BeastAvatarIcon"); } break; case EnumAtlasType.Skill: if (id >= 0 && id <= 30) { result = string.Format("Atlas/SkillIcon/Exproler/{0}", "ExprolerSkillIcon"); } if (id >= 10000 && id <= 10100) { result = string.Format("Atlas/SkillIcon/Exproler/{0}", "ExprolerSkillIcon"); } break; } return(result); }
/// <summary> /// 取得图集名称 /// </summary> /// <param name="eAtlasType"></param> /// <param name="stringId"></param> /// <returns></returns> public string GetAtlasName(EnumAtlasType eAtlasType, string stringId) { int id; string result = string.Empty; try { bool flag = int.TryParse(stringId, out id); if (flag) { result = this.GetAtlasNameById(eAtlasType, id); } } catch (Exception e) { this.m_log.Fatal(e.ToString()); Debug.LogException(e); } return(result); }