| | |
| | | [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); |
| | | return; |
| | | } |
| | | |
| | | |
| | | this.gameObject.SetActive(true); |
| | | heroCardBG.SetSprite("herocardbg" + hero.Quality); |
| | | if (glowMaterial != null) |
| | |
| | | } |
| | | 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)); |
| | | |
| | | redpoint.redpointId = MainRedDot.HeroCardRedpoint * 1000 + hero.itemHero.gridIndex; |
| | | var funcState = hero.funcState; |
| | | if (funcState > 0) |
| | | { |
| | | { |
| | | trainStateImg.SetActive(true); |
| | | trainStateImg.SetSprite("herofuncstate" + hero.funcState); |
| | | } |
| | |
| | | else if ((hero.heroStar - 1) % starImgList.Count >= i) |
| | | { |
| | | starImgList[i].SetActive(true); |
| | | starImgList[i].SetSprite("herostar" + (((hero.heroStar - 1)/starImgList.Count)+1)*starImgList.Count); |
| | | starImgList[i].SetSprite("herostar" + (((hero.heroStar - 1) / starImgList.Count) + 1) * starImgList.Count); |
| | | } |
| | | else |
| | | { |
| | | starImgList[i].SetActive(false); |
| | | } |
| | | } |
| | | |
| | | heroCardBtn.AddListener(() => |
| | | { |
| | | HeroUIManager.Instance.selectHeroGuid = guid; |
| | | UIManager.Instance.OpenWindow<HeroTrainWin>(); |
| | | }); |
| | | } |
| | | } |
| | | |