| | |
| | | [SerializeField] Text awakeLVText; |
| | | [SerializeField] List<Image> starImgList; |
| | | |
| | | string guid; |
| | | public void Display(int index) |
| | | { |
| | | var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.heroSortList[index]); |
| | | guid = HeroUIManager.Instance.heroSortList[index]; |
| | | var hero = HeroManager.Instance.GetHero(guid); |
| | | if (hero == null) |
| | | { |
| | | this.gameObject.SetActive(false); |
| | |
| | | } |
| | | lvText.text = Language.Get("L1094") + hero.heroLevel.ToString(); |
| | | var heroConfig = hero.heroConfig; |
| | | countryImg.SetSprite("herocountry" + heroConfig.Country); |
| | | jobImg.SetSprite("herojob" + heroConfig.Class); |
| | | countryImg.SetSprite(HeroUIManager.Instance.GetCountryIconName(heroConfig.Country)); |
| | | jobImg.SetSprite(HeroUIManager.Instance.GetJobIconName(heroConfig.Class)); |
| | | heroModel.Create(heroConfig.SkinIDList[hero.SkinIndex], heroConfig.UIScale); |
| | | onStateImg.SetActive(hero.IsInTeamByTeamType(TeamType.Story)); |
| | | |
| | |
| | | starImgList[i].SetActive(false); |
| | | } |
| | | } |
| | | |
| | | heroCardBtn.AddListener(() => |
| | | { |
| | | HeroUIManager.Instance.selectHeroGuid = guid; |
| | | UIManager.Instance.OpenWindow<HeroTrainWin>(); |
| | | }); |
| | | } |
| | | } |
| | | |