public void OnSetUpItems()
        {
            GameManager instance = MonoSingleton <GameManager> .Instance;

            VersusTowerParam[] versusTowerParam = instance.GetVersusTowerParam();
            if (versusTowerParam != null)
            {
                for (int index = 0; index < versusTowerParam.Length; ++index)
                {
                    if (string.Equals((string)versusTowerParam[index].VersusTowerID, instance.VersusTowerMatchName))
                    {
                        ++this.m_Max;
                    }
                }
                this.m_Max += this.MARGIN;
            }
            ScrollListController component1 = (ScrollListController)((Component)this).GetComponent <ScrollListController>();

            ScrollListController.OnItemPositionChange onItemUpdate           = component1.OnItemUpdate;
            ScrollClamped_VersusTowerInfo             clampedVersusTowerInfo = this;
            // ISSUE: virtual method pointer
            UnityAction <int, GameObject> unityAction = new UnityAction <int, GameObject>((object)clampedVersusTowerInfo, __vmethodptr(clampedVersusTowerInfo, OnUpdateItems));

            onItemUpdate.AddListener(unityAction);
            ((ScrollRect)((Component)this).GetComponentInParent <ScrollRect>()).set_movementType((ScrollRect.MovementType) 2);
            RectTransform component2 = (RectTransform)((Component)this).GetComponent <RectTransform>();
            Vector2       sizeDelta  = component2.get_sizeDelta();

            sizeDelta.y = (__Null)((double)component1.ItemScale * (double)this.Space * (double)this.m_Max);
            component2.set_sizeDelta(sizeDelta);
        }
Ejemplo n.º 2
0
        public void OnSetUpItems()
        {
            if (this.m_UserDatas == null)
            {
                return;
            }
            ScrollListController component1 = (ScrollListController)((Component)this).GetComponent <ScrollListController>();

            ScrollListController.OnItemPositionChange onItemUpdate1 = component1.OnItemUpdate;
            RankingQuestRankList rankingQuestRankList1 = this;
            // ISSUE: virtual method pointer
            UnityAction <int, GameObject> unityAction1 = new UnityAction <int, GameObject>((object)rankingQuestRankList1, __vmethodptr(rankingQuestRankList1, OnUpdateItems));

            onItemUpdate1.RemoveListener(unityAction1);
            ScrollListController.OnItemPositionChange onItemUpdate2 = component1.OnItemUpdate;
            RankingQuestRankList rankingQuestRankList2 = this;
            // ISSUE: virtual method pointer
            UnityAction <int, GameObject> unityAction2 = new UnityAction <int, GameObject>((object)rankingQuestRankList2, __vmethodptr(rankingQuestRankList2, OnUpdateItems));

            onItemUpdate2.AddListener(unityAction2);
            ((ScrollRect)((Component)this).GetComponentInParent <ScrollRect>()).set_movementType((ScrollRect.MovementType) 2);
            RectTransform component2       = (RectTransform)((Component)this).GetComponent <RectTransform>();
            Vector2       sizeDelta        = component2.get_sizeDelta();
            Vector2       anchoredPosition = component2.get_anchoredPosition();

            this.m_Max         = this.m_UserDatas.Length;
            component1.Space   = (component1.ItemScale + this.Space) / component1.ItemScale;
            anchoredPosition.y = (__Null)0.0;
            sizeDelta.y        = (__Null)((double)component1.ItemScale * (double)component1.Space * (double)this.m_Max);
            component2.set_sizeDelta(sizeDelta);
            component2.set_anchoredPosition(anchoredPosition);
        }
        public void OnSetUpItems()
        {
            List <MultiTowerFloorParam> mtAllFloorParam = MonoSingleton <GameManager> .Instance.GetMTAllFloorParam(GlobalVars.SelectedMultiTowerID);

            if (mtAllFloorParam != null)
            {
                this.mMax = mtAllFloorParam.Count;
            }
            this.mMax += this.MARGIN;
            ScrollListController component1 = (ScrollListController)((Component)this).GetComponent <ScrollListController>();

            ScrollListController.OnItemPositionChange onItemUpdate = component1.OnItemUpdate;
            ScrollClamped_MultiTower clampedMultiTower             = this;
            // ISSUE: virtual method pointer
            UnityAction <int, GameObject> unityAction = new UnityAction <int, GameObject>((object)clampedMultiTower, __vmethodptr(clampedMultiTower, OnUpdateItems));

            onItemUpdate.AddListener(unityAction);
            ((ScrollRect)((Component)this).GetComponentInParent <ScrollRect>()).set_movementType((ScrollRect.MovementType) 2);
            RectTransform component2       = (RectTransform)((Component)this).GetComponent <RectTransform>();
            Vector2       sizeDelta        = component2.get_sizeDelta();
            Vector2       anchoredPosition = component2.get_anchoredPosition();
            float         num1             = component1.ItemScale * this.Space;
            float         num2             = num1 - component1.ItemScale;

            anchoredPosition.y = (__Null)((double)component1.ItemScale * (double)this.OFFSET);
            sizeDelta.y        = (__Null)((double)num1 * (double)(this.mMax - this.MARGIN) - (double)num2);
            component2.set_sizeDelta(sizeDelta);
            component2.set_anchoredPosition(anchoredPosition);
            if (Object.op_Inequality((Object)this.AutoFit, (Object)null))
            {
                this.AutoFit.ItemScale = component1.ItemScale * this.Space;
            }
            this.TowerInfo.Init();
        }
        public void OnSetUpItems()
        {
            GameManager instance = MonoSingleton <GameManager> .Instance;

            VersusTowerParam[] versusTowerParam = instance.GetVersusTowerParam();
            if (versusTowerParam != null)
            {
                for (int index = versusTowerParam.Length - 1; index >= 0; --index)
                {
                    if (string.Equals((string)versusTowerParam[index].VersusTowerID, instance.VersusTowerMatchName))
                    {
                        if (this.Arrival)
                        {
                            if (string.IsNullOrEmpty((string)versusTowerParam[index].ArrivalIteminame))
                            {
                                continue;
                            }
                        }
                        else if (versusTowerParam[index].SeasonIteminame == null || versusTowerParam[index].SeasonIteminame.Length == 0)
                        {
                            continue;
                        }
                        this.m_Param.Add(versusTowerParam[index]);
                    }
                }
                this.m_Max = this.m_Param.Count;
            }
            ScrollListController component1 = (ScrollListController)((Component)this).GetComponent <ScrollListController>();

            ScrollListController.OnItemPositionChange onItemUpdate = component1.OnItemUpdate;
            ScrollClamped_VersusReward clampedVersusReward         = this;
            // ISSUE: virtual method pointer
            UnityAction <int, GameObject> unityAction = new UnityAction <int, GameObject>((object)clampedVersusReward, __vmethodptr(clampedVersusReward, OnUpdateItems));

            onItemUpdate.AddListener(unityAction);
            ((ScrollRect)((Component)this).GetComponentInParent <ScrollRect>()).set_movementType((ScrollRect.MovementType) 2);
            RectTransform component2       = (RectTransform)((Component)this).GetComponent <RectTransform>();
            Vector2       sizeDelta        = component2.get_sizeDelta();
            Vector2       anchoredPosition = component2.get_anchoredPosition();

            anchoredPosition.y = (__Null)0.0;
            sizeDelta.y        = (__Null)((double)component1.ItemScale * (double)this.Space * (double)this.m_Max);
            component2.set_sizeDelta(sizeDelta);
            component2.set_anchoredPosition(anchoredPosition);
        }
Ejemplo n.º 5
0
        public void OnSetUpItems()
        {
            MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance;

            if (instance.CurrentState != MyPhoton.MyState.LOBBY)
            {
                return;
            }
            if (this.m_Rooms == null)
            {
                this.m_Rooms = new List <MyPhoton.MyRoom>();
            }
            this.m_Rooms.Clear();
            List <MyPhoton.MyRoom> roomList = instance.GetRoomList();

            for (int index = 0; index < roomList.Count; ++index)
            {
                if (roomList[index].lobby == this.VS_LOBBY_NAME && roomList[index].name.IndexOf(this.VS_FRIEND_SUFFIX) == -1 && roomList[index].start)
                {
                    this.m_Rooms.Add(roomList[index]);
                }
            }
            this.m_Max = this.m_Rooms.Count;
            ScrollListController component1 = (ScrollListController)((Component)this).GetComponent <ScrollListController>();

            ScrollListController.OnItemPositionChange onItemUpdate = component1.OnItemUpdate;
            ScrollClamped_VersusViewList clampedVersusViewList     = this;
            // ISSUE: virtual method pointer
            UnityAction <int, GameObject> unityAction = new UnityAction <int, GameObject>((object)clampedVersusViewList, __vmethodptr(clampedVersusViewList, OnUpdateItems));

            onItemUpdate.AddListener(unityAction);
            ((ScrollRect)((Component)this).GetComponentInParent <ScrollRect>()).set_movementType((ScrollRect.MovementType) 2);
            RectTransform component2       = (RectTransform)((Component)this).GetComponent <RectTransform>();
            Vector2       sizeDelta        = component2.get_sizeDelta();
            Vector2       anchoredPosition = component2.get_anchoredPosition();

            anchoredPosition.y = (__Null)0.0;
            sizeDelta.y        = (__Null)((double)component1.ItemScale * (double)this.Space * (double)this.m_Max);
            component2.set_sizeDelta(sizeDelta);
            component2.set_anchoredPosition(anchoredPosition);
        }
Ejemplo n.º 6
0
        public void OnSetUpItems()
        {
            this.mController = (ScrollListController)((Component)this).GetComponent <ScrollListController>();
            ScrollListController.OnItemPositionChange onItemUpdate = this.mController.OnItemUpdate;
            ScrollClamped_TownMenu scrollClampedTownMenu           = this;
            // ISSUE: virtual method pointer
            UnityAction <int, GameObject> unityAction = new UnityAction <int, GameObject>((object)scrollClampedTownMenu, __vmethodptr(scrollClampedTownMenu, OnUpdateItems));

            onItemUpdate.AddListener(unityAction);
            // ISSUE: method pointer
            this.mController.OnUpdateItemEvent.AddListener(new UnityAction <List <RectTransform> >((object)this, __methodptr(OnUpdateScale)));
            // ISSUE: method pointer
            this.mController.OnAfterStartup.AddListener(new UnityAction <bool>((object)this, __methodptr(OnAfterStartup)));
            float num1 = 0.0f;

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ViewObj, (UnityEngine.Object)null))
            {
                Rect rect = this.ViewObj.get_rect();
                // ISSUE: explicit reference operation
                num1 = ((Rect)@rect).get_width() * 0.5f;
            }
            RectTransform component        = (RectTransform)((Component)this).GetComponent <RectTransform>();
            Vector2       sizeDelta        = component.get_sizeDelta();
            Vector2       anchoredPosition = component.get_anchoredPosition();
            float         num2             = this.mController.ItemScale * this.Space;

            anchoredPosition.x = (__Null)((double)num1 - (double)this.mController.ItemScale * 0.5);
            sizeDelta.x        = (__Null)((double)num2 * (double)this.Max);
            component.set_sizeDelta(sizeDelta);
            component.set_anchoredPosition(anchoredPosition);
            this.mStartPos = (float)anchoredPosition.x;
            this.mOffset   = this.mController.ItemScale * 0.5f;
            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AutoFit, (UnityEngine.Object)null))
            {
                return;
            }
            this.AutoFit.ItemScale = num2;
            this.AutoFit.Offset    = this.mStartPos;
        }
Ejemplo n.º 7
0
        public void OnSetUpItems()
        {
            HelpWindow componentInParent = (HelpWindow)((Component)((Component)this).get_transform()).GetComponentInParent <HelpWindow>();

            if (Object.op_Equality((Object)componentInParent, (Object)null))
            {
                return;
            }
            ScrollListController component1 = (ScrollListController)((Component)this).GetComponent <ScrollListController>();

            ScrollListController.OnItemPositionChange onItemUpdate = component1.OnItemUpdate;
            ScrollClamped scrollClamped = this;
            // ISSUE: virtual method pointer
            UnityAction <int, GameObject> unityAction = new UnityAction <int, GameObject>((object)scrollClamped, __vmethodptr(scrollClamped, OnUpdateItems));

            onItemUpdate.AddListener(unityAction);
            ((ScrollRect)((Component)this).GetComponentInParent <ScrollRect>()).set_movementType((ScrollRect.MovementType) 2);
            RectTransform component2 = (RectTransform)((Component)this).GetComponent <RectTransform>();
            Vector2       sizeDelta  = component2.get_sizeDelta();

            if (componentInParent.MiddleHelp)
            {
                this.m_Max = this.m_CategoryNum[componentInParent.SelectMiddleID];
            }
            else
            {
                string s = LocalizedText.Get("help.MENU_L_NUM");
                if (string.IsNullOrEmpty(s))
                {
                    return;
                }
                this.m_Max = int.Parse(s);
            }
            sizeDelta.y = (__Null)((double)component1.ItemScale * 1.20000004768372 * (double)this.m_Max);
            component2.set_sizeDelta(sizeDelta);
        }