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); }
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 OnChangeSeason(bool flg) { if (!flg || !Object.op_Inequality((Object)this.SeasonView, (Object)null) || !Object.op_Inequality((Object)this.ArrivalView, (Object)null)) { return; } this.ArrivalView.SetActive(false); this.SeasonView.SetActive(true); this.SetScrollRect((RectTransform)this.SeasonView.GetComponent <RectTransform>()); ScrollListController component = (ScrollListController)this.SeasonView.GetComponent <ScrollListController>(); if (!Object.op_Inequality((Object)component, (Object)null)) { return; } component.Refresh(); float num1 = (float)((RectTransform)this.SeasonView.GetComponent <RectTransform>()).get_sizeDelta().y; if (Object.op_Inequality((Object)this.ListParent, (Object)null)) { double num2 = (double)num1; Rect rect = this.ListParent.get_rect(); // ISSUE: explicit reference operation double height = (double)((Rect)@rect).get_height(); num1 = (float)(num2 - height); } int num3 = Mathf.Max(MonoSingleton <GameManager> .Instance.Player.VersusTowerFloor - 1, 0); float num4 = component.ItemScale * this.SPACE_SCALE; float num5 = Mathf.Min(num1 - num4 * (float)num3, num1); component.MovePos(num5, num5); }
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); }
public void UpdateHelpList(bool flag, int Idx) { GameObject gameObject = GameObject.Find("View"); if (Object.op_Equality((Object)gameObject, (Object)null)) { return; } ScrollListController component1 = (ScrollListController)gameObject.GetComponent <ScrollListController>(); this.bMiddleHelp = flag; this.SelMiddleIdx = Idx; component1.UpdateList(); if (this.MiddleHelp) { ((Component)this.MiddleBackButton).get_gameObject().SetActive(true); } Transform child = ((Component)this).get_transform().FindChild("window/header"); if (!Object.op_Inequality((Object)child, (Object)null)) { return; } LText component2 = (LText)((Component)child.FindChild("Text")).GetComponent <LText>(); if (!Object.op_Inequality((Object)component2, (Object)null)) { return; } string str = LocalizedText.Get("help.TITLE"); if (this.MiddleHelp) { str = str + "-" + LocalizedText.Get("help.MENU_CATE_NAME_" + (object)(Idx + 1)); } if (string.IsNullOrEmpty(str)) { return; } component2.set_text(str); }
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); }
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; }
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); }