예제 #1
0
        // Token: 0x0600BDC7 RID: 48583 RVA: 0x00351190 File Offset: 0x0034F390
        protected override void OnBindFiledsCompleted()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnBindFiledsCompleted_hotfix != null)
            {
                this.m_OnBindFiledsCompleted_hotfix.call(new object[]
                {
                    this
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.OnBindFiledsCompleted();
            this.m_configDataLoader = (GameManager.Instance.ConfigDataLoader as IConfigDataLoader);
            this.m_playerContext    = (GameManager.Instance.PlayerContext as ProjectLPlayerContext);
            if (!this.m_playerContext.IsMe(this.m_playerContext.BusinessCard.UserId))
            {
                return;
            }
            this.m_battleTypeButton.onClick.AddListener(new UnityAction(this.OnBattleTypeShowClick));
            this.m_heroDrawButton.onClick.AddListener(new UnityAction(this.OnHeroDrawShowClick));
            this.m_teamShowButton.onClick.AddListener(new UnityAction(this.OnTeamShowClick));
            this.m_bgButton.onClick.AddListener(new UnityAction(this.OnBGButtonClick));
            for (int i = 0; i < this.m_heroListInfinityGrid.MinAmount; i++)
            {
                GameObject             gameObject             = UnityEngine.Object.Instantiate <GameObject>(this.m_heroListItemPrefab);
                ARHeroCardUIController arheroCardUIController = GameObjectUtility.AddControllerToGameObject <ARHeroCardUIController>(gameObject);
                arheroCardUIController.EventOnSelectHeroItem += this.OnHeroItemClick;
                gameObject.transform.SetParent(this.m_heroListInfinityGrid.transform, false);
                this.m_arHeroCardUIControllerList.Add(arheroCardUIController);
            }
            InfinityGridLayoutGroup heroListInfinityGrid = this.m_heroListInfinityGrid;

            heroListInfinityGrid.updateChildrenCallback = (InfinityGridLayoutGroup.UpdateChildrenCallbackDelegate)Delegate.Combine(heroListInfinityGrid.updateChildrenCallback, new InfinityGridLayoutGroup.UpdateChildrenCallbackDelegate(this.UpdateInfinityHeroItemCallback));
            List <Hero> heros = this.m_playerContext.GetHeros();

            heros.Sort((Hero left, Hero right) => right.HeroInfo.Rank - left.HeroInfo.Rank);
            foreach (Hero hero in heros)
            {
                ARHeroListUIController.HeroWrap heroWrap = new ARHeroListUIController.HeroWrap();
                heroWrap.hero = hero;
                this.m_heroWrapList.Add(heroWrap);
            }
            if (this.m_heroWrapList.Count > 0)
            {
                this.SelectHero(this.m_heroWrapList[0]);
            }
        }
        // Token: 0x0600F1BD RID: 61885 RVA: 0x0040383C File Offset: 0x00401A3C
        protected override void OnBindFiledsCompleted()
        {
            base.OnBindFiledsCompleted();
            this.m_configDataLoader = (GameManager.Instance.ConfigDataLoader as IConfigDataLoader);
            this.m_playerContext    = (GameManager.Instance.PlayerContext as ProjectLPlayerContext);
            this.m_closeButton.onClick.AddListener(new UnityAction(this.OnCloseClick));
            this.m_bgButton.onClick.AddListener(new UnityAction(this.OnBgClick));
            for (int i = 0; i < this.m_rankingInfinityGrid.MinAmount; i++)
            {
                GameObject go = GameObjectUtility.CloneGameObject(this.m_contributionRankingItemPrefab, this.m_rankingInfinityGrid.transform);
                GuildContributionRankingItemUIController guildContributionRankingItemUIController = GameObjectUtility.AddControllerToGameObject <GuildContributionRankingItemUIController>(go);
            }
            InfinityGridLayoutGroup rankingInfinityGrid = this.m_rankingInfinityGrid;

            rankingInfinityGrid.updateChildrenCallback = (InfinityGridLayoutGroup.UpdateChildrenCallbackDelegate)Delegate.Combine(rankingInfinityGrid.updateChildrenCallback, new InfinityGridLayoutGroup.UpdateChildrenCallbackDelegate(this.OnItemUpdate));
            GuildMassiveCombatInfo currentGuildMassiveCombatInfo = this.m_playerContext.GetCurrentGuildMassiveCombatInfo();

            this.m_guildMassiveCombatMemberList = currentGuildMassiveCombatInfo.Members;
            this.m_guildMassiveCombatMemberList.Sort(new Comparison <GuildMassiveCombatMemberInfo>(this.RankCompare));
        }