| using System; | 
| using System.Collections; | 
| using System.Collections.Generic; | 
|   | 
| using UnityEngine; | 
|   | 
| //觉醒 | 
| public partial class HeroUIManager : GameSystemManager<HeroUIManager> | 
| { | 
|     public string selectAwakeHeroGuid; | 
|   | 
|     public List<int> heroBeforeAwakeGiftIDList = new List<int>();    //会有重复的ID,不要用字典 | 
|     public List<int> heroBeforeAwakeGiftLevelList = new List<int>(); | 
|   | 
|   | 
|     //达到X星需要的觉醒等级 | 
|     public int GetAwakeLVByStarLV(int heroID, int starLV) | 
|     { | 
|         var config = HeroConfig.Get(heroID); | 
|         var starCnt = HeroQualityConfig.Get(config.Quality).InitStarUpper; | 
|         if (starLV <= starCnt) | 
|             return 0; | 
|   | 
|         Dictionary<int, HeroAwakeConfig> tempDic = null; | 
|         if (!HeroAwakeConfig.configDics.TryGetValue(heroID, out tempDic)) | 
|         { | 
|             return 0; | 
|         } | 
|         foreach (var item in tempDic) | 
|         { | 
|             starCnt += item.Value.AddStarUpper; | 
|             if (starCnt >= starLV) | 
|             { | 
|                 return item.Key; | 
|             } | 
|         } | 
|         return 0; | 
|     } | 
|   | 
|   | 
| } |