| | |
| | | protected override void InitComponent() |
| | | { |
| | | awakeBtn.AddListener(AwakeHero); |
| | | watchBtn.AddListener(() => |
| | | { |
| | | UIManager.Instance.OpenWindow<HeroAwakePrivewWin>(); |
| | | }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | alphaTween.Stop(); |
| | | HeroManager.Instance.onHeroChangeEvent += OnHeroChangeEvent; |
| | | UIManager.Instance.OnCloseWindow += OnCloseWindow; |
| | | Display(); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | HeroManager.Instance.onHeroChangeEvent -= OnHeroChangeEvent; |
| | | UIManager.Instance.OnCloseWindow -= OnCloseWindow; |
| | | } |
| | | |
| | | protected override void OnOpen() |
| | |
| | | return; |
| | | } |
| | | if (hero.talentAwakeRandomIDList.Count > 0) |
| | | { |
| | | { |
| | | UIManager.Instance.OpenWindow<HeroAwakeSelectGiftWin>(); |
| | | } |
| | | } |
| | |
| | | int startLV = hero.awakeLevel / 6 * 6 + 1; |
| | | heroAwakeCellList[hero.awakeLevel - startLV + 1].ShowActiveEffect(hero, hero.awakeLevel + 1); |
| | | |
| | | //切换轮的时候做个表现 |
| | | if (hero.awakeLevel % 6 == 5) |
| | | { |
| | | alphaTween.Play(); |
| | | } |
| | | } |
| | | |
| | | void OnHeroChangeEvent(HeroInfo hero) |
| | | { |
| | | { |
| | | if (hero.itemHero.guid != HeroUIManager.Instance.selectAwakeHeroGuid) |
| | | { |
| | | return; |
| | | } |
| | | Display(); |
| | | } |
| | | |
| | | void OnCloseWindow(UIBase win) |
| | | { |
| | | if (win is HeroAwakeSuccessWin && HeroManager.Instance.GetHero(HeroUIManager.Instance.selectAwakeHeroGuid).awakeLevel%6 == 0) |
| | | { |
| | | //切换轮的时候做个表现 |
| | | alphaTween.Play(()=> |
| | | { |
| | | Display(); |
| | | }); |
| | | } |
| | | } |
| | | } |