// Use this for initialization void Start() { ////初始化数据列表; infinityGridLayoutGroup = transform.Find("KnapsackPanel/SlotPanel").GetComponent <InfinityGridLayoutGroup>(); infinityGridLayoutGroup.SetAmount(amount); infinityGridLayoutGroup.updateChildrenCallback = UpdateChildrenCallback; }
// Use this for initialization void Start() { ////初始化数据列表; infinityGridLayoutGroup = transform.Find("VirtualList/Panel_Scroll/Panel_Grid").GetComponent <InfinityGridLayoutGroup>(); infinityGridLayoutGroup.SetAmount(amount); infinityGridLayoutGroup.Register(UpdateChildrenCallback); }
public static int set_updateChildrenCallback(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); InfinityGridLayoutGroup.UpdateChildrenCallbackDelegate updateChildrenCallbackDelegate; int num = LuaObject.checkDelegate <InfinityGridLayoutGroup.UpdateChildrenCallbackDelegate>(l, 2, out updateChildrenCallbackDelegate); if (num == 0) { infinityGridLayoutGroup.updateChildrenCallback = updateChildrenCallbackDelegate; } else if (num == 1) { InfinityGridLayoutGroup infinityGridLayoutGroup2 = infinityGridLayoutGroup; infinityGridLayoutGroup2.updateChildrenCallback = (InfinityGridLayoutGroup.UpdateChildrenCallbackDelegate)Delegate.Combine(infinityGridLayoutGroup2.updateChildrenCallback, updateChildrenCallbackDelegate); } else if (num == 2) { InfinityGridLayoutGroup infinityGridLayoutGroup3 = infinityGridLayoutGroup; infinityGridLayoutGroup3.updateChildrenCallback = (InfinityGridLayoutGroup.UpdateChildrenCallbackDelegate)Delegate.Remove(infinityGridLayoutGroup3.updateChildrenCallback, updateChildrenCallbackDelegate); } LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
// Use this for initialization void Start() { ////初始化数据列表; infinityGridLayoutGroup = transform.Find("Panel_Scroll/Panel_Grid").GetComponent <InfinityGridLayoutGroup>(); infinityGridLayoutGroup.SetAmount(amount); infinityGridLayoutGroup.updateChildrenCallback = UpdateChildrenCallback; }
public void SpwanHistroyGrade_Round() { // Debug.LogError("开始产生对应的战绩预置体"); UIMainView.Instance.HistroyGradePanel.GradeRect_Round.transform.Find("Content").GetComponent <GridLayoutGroup>().enabled = true; UIMainView.Instance.HistroyGradePanel.GradeRect_Round.transform.Find("Content").GetComponent <ContentSizeFitter>().enabled = true; int count = Grade_RoundData_.Count; if (count <= 0) { MahjongCommonMethod.Instance.ShowRemindFrame("本条记录没有战绩"); return; } if (count > 5) { HistroyGradePanelData hgpd = GameData.Instance.HistroyGradePanelData; for (int i = 0; i < 5; i++) { GameObject go = Instantiate(Resources.Load <GameObject>("Lobby/HistroyGrade/HistroyGrade_Round")); go.transform.SetParent(UIMainView.Instance.HistroyGradePanel.GradeRect_Round.transform.Find("Content")); go.transform.localEulerAngles = Vector3.zero; go.transform.localPosition = new Vector3(go.transform.localPosition.x, go.transform.localPosition.y, 0); go.transform.localScale = Vector3.one; go.name = "HistroyGrade_Round_" + i; UIMainView.Instance.HistroyGradePanel.GradeRect_Round.transform.Find("Content"). GetComponent <InfinityGridLayoutGroup>().children.Add(go.GetComponent <RectTransform>()); // Debug.Log ("go.name:" + go.name); } //初始化数据列表; infinityGridLayoutGroup = UIMainView.Instance.HistroyGradePanel.GradeRect_Round.transform.Find("Content").GetComponent <InfinityGridLayoutGroup>(); infinityGridLayoutGroup.Init(); infinityGridLayoutGroup.SetAmount(Grade_RoundData_.Count); infinityGridLayoutGroup.updateChildrenCallback = UpdateChildrenCallback; } else { for (int i = 0; i < count; i++) { GameObject go = Instantiate(Resources.Load <GameObject>("Lobby/HistroyGrade/HistroyGrade_Round")); go.transform.SetParent(UIMainView.Instance.HistroyGradePanel.GradeRect_Round.transform.Find("Content")); go.transform.localEulerAngles = Vector3.zero; go.transform.localPosition = new Vector3(go.transform.localPosition.x, go.transform.localPosition.y, 0); go.transform.localScale = Vector3.one; go.name = "HistroyGrade_Round_" + i; HistroyGradeRound round = go.GetComponent <HistroyGradeRound>(); round.RoundData = Grade_RoundData_[i]; round.UpdateShow(i + 1); } //初始化数据列表; infinityGridLayoutGroup = UIMainView.Instance.HistroyGradePanel.GradeRect_Round.transform.Find("Content").GetComponent <InfinityGridLayoutGroup>(); infinityGridLayoutGroup.Init(); infinityGridLayoutGroup.SetAmount(Grade_RoundData_.Count); infinityGridLayoutGroup.updateChildrenCallback = UpdateChildrenCallback; } }
/// <summary> /// 产生所有小红包 /// </summary> public void SpwanSmallRedBag() { MahjongLobby_AH.ParlorSmallRedBag[] parlor = RbMessageParent.GetComponentsInChildren <MahjongLobby_AH.ParlorSmallRedBag>(); int count = 0; //红包数量 count = (SmallRedBagMessage.Count > 6) ? 6 : SmallRedBagMessage.Count; int count_ = count > parlor.Length ? count : parlor.Length; for (int i = 0; i < count_; i++) { MahjongLobby_AH.ParlorSmallRedBag temp = null; if (i > parlor.Length - 1) { GameObject go = Instantiate(parlor[0].gameObject); go.transform.SetParent(RbMessageParent.transform); go.transform.localPosition = new Vector3(go.transform.localPosition.x, go.transform.localPosition.y, 0); go.transform.localScale = Vector3.one; go.transform.localEulerAngles = Vector3.zero; temp = go.GetComponent <MahjongLobby_AH.ParlorSmallRedBag>(); //更新界面 temp.UpdateShow(SmallRedBagMessage[i]); } else { if (i > SmallRedBagMessage.Count - 1) { parlor[i].gameObject.SetActive(false); } else { parlor[i].gameObject.SetActive(true); temp = parlor[i]; //更新界面 temp.UpdateShow(SmallRedBagMessage[i]); } } } RbMessageParent.GetComponent <ContentSizeFitter>().enabled = true; RbMessageParent.GetComponent <GridLayoutGroup>().enabled = true; if (SmallRedBagMessage.Count > 6) { infinityGridLayoutGroup = RbMessageParent.GetComponent <InfinityGridLayoutGroup>(); infinityGridLayoutGroup.RemoveListener_Rect(); infinityGridLayoutGroup.Init(); infinityGridLayoutGroup.SetAmount(SmallRedBagMessage.Count); infinityGridLayoutGroup.updateChildrenCallback = UpdateParlorSamllRedBag; } }
public static int get_childsSiblingIndex(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); LuaObject.pushValue(l, true); LuaObject.pushValue(l, infinityGridLayoutGroup.m_luaExportHelper.childsSiblingIndex); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int Start(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); infinityGridLayoutGroup.m_luaExportHelper.Start(); LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int get_MinAmount(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); LuaObject.pushValue(l, true); LuaObject.pushValue(l, infinityGridLayoutGroup.MinAmount); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int InitChildren(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); IEnumerator o = infinityGridLayoutGroup.m_luaExportHelper.InitChildren(); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_childsSiblingIndex(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); Dictionary <Transform, int> childsSiblingIndex; LuaObject.checkType <Dictionary <Transform, int> >(l, 2, out childsSiblingIndex); infinityGridLayoutGroup.m_luaExportHelper.childsSiblingIndex = childsSiblingIndex; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_gridLayoutPos(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); Vector2 gridLayoutPos; LuaObject.checkType(l, 2, out gridLayoutPos); infinityGridLayoutGroup.m_luaExportHelper.gridLayoutPos = gridLayoutPos; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int SetAmount(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); int amount; LuaObject.checkType(l, 2, out amount); infinityGridLayoutGroup.SetAmount(amount); LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_scrollRect(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); ScrollRect scrollRect; LuaObject.checkType <ScrollRect>(l, 2, out scrollRect); infinityGridLayoutGroup.m_luaExportHelper.scrollRect = scrollRect; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_contentSizeFitter(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); ContentSizeFitter contentSizeFitter; LuaObject.checkType <ContentSizeFitter>(l, 2, out contentSizeFitter); infinityGridLayoutGroup.m_luaExportHelper.contentSizeFitter = contentSizeFitter; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_rectTransform(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); RectTransform rectTransform; LuaObject.checkType <RectTransform>(l, 2, out rectTransform); infinityGridLayoutGroup.m_luaExportHelper.rectTransform = rectTransform; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int ScrollCallback(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); Vector2 data; LuaObject.checkType(l, 2, out data); infinityGridLayoutGroup.m_luaExportHelper.ScrollCallback(data); LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_hasInit(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); bool hasInit; LuaObject.checkType(l, 2, out hasInit); infinityGridLayoutGroup.m_luaExportHelper.hasInit = hasInit; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_children(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); List <RectTransform> children; LuaObject.checkType <List <RectTransform> >(l, 2, out children); infinityGridLayoutGroup.m_luaExportHelper.children = children; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int UpdateChildrenCallback(IntPtr l) { int result; try { InfinityGridLayoutGroup infinityGridLayoutGroup = (InfinityGridLayoutGroup)LuaObject.checkSelf(l); int index; LuaObject.checkType(l, 2, out index); Transform trans; LuaObject.checkType <Transform>(l, 3, out trans); infinityGridLayoutGroup.m_luaExportHelper.UpdateChildrenCallback(index, trans); LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
/// <summary> /// 产生历史战绩的面板 /// </summary> public void SpwanHistoryPanel() { //删除玩家的之前的面板 HistroyGradeRoom[] rooms = GradeRect_Room.transform.Find("Content").GetComponentsInChildren <HistroyGradeRoom>(); if (rooms.Length > 0) { for (int i = 0; i < rooms.Length; i++) { Destroy(rooms[i].gameObject); } //return; } GradeRect_Room.transform.Find("Content").GetComponent <GridLayoutGroup>().enabled = true; GradeRect_Room.transform.Find("Content").GetComponent <ContentSizeFitter>().enabled = true; HistroyGradePanelData hgpd = GameData.Instance.HistroyGradePanelData; int count = hgpd.GradeMessage.Count; if (count <= 0) { hgpd.isShowGrade_Room = false; hgpd.isShowGrade_Round = false; UpdateShow(); } //Debug.LogError("hgpd.GradeMessage:" + hgpd.GradeMessage.Count); if (count > 5) { for (int i = 0; i < 5; i++) { GameObject go = Instantiate(Resources.Load <GameObject>("Lobby/HistroyGrade/HistroyGrade_Room")); go.transform.SetParent(GradeRect_Room.transform.Find("Content")); go.transform.localEulerAngles = Vector3.zero; go.transform.localPosition = new Vector3(go.transform.localPosition.x, go.transform.localPosition.y, 0); go.transform.localScale = Vector3.one; go.name = "HistroyGrade_Room_" + i; } //初始化数据列表; infinityGridLayoutGroup = GradeRect_Room.transform.Find("Content").GetComponent <InfinityGridLayoutGroup>(); infinityGridLayoutGroup.Init(); //Invoke("SetAmount", 0.1f); infinityGridLayoutGroup.SetAmount(hgpd.GradeMessage.Count); infinityGridLayoutGroup.updateChildrenCallback = UpdateChildrenCallback; } else { for (int i = 0; i < count; i++) { GameObject go = Instantiate(Resources.Load <GameObject>("Lobby/HistroyGrade/HistroyGrade_Room")); go.transform.SetParent(GradeRect_Room.transform.Find("Content")); go.transform.localEulerAngles = Vector3.zero; go.transform.localPosition = new Vector3(go.transform.localPosition.x, go.transform.localPosition.y, 0); go.transform.localScale = Vector3.one; go.name = "HistroyGrade_Room_" + i; HistroyGradeRoom room = go.GetComponent <HistroyGradeRoom>(); room.GradeRoom = hgpd.GradeMessage[i]; room.index = i; room.UpdateShow(); } } }
void Start() { infinityGridLayoutGroup = transform.GetComponentInChildren <InfinityGridLayoutGroup>(); infinityGridLayoutGroup.SetAmount(amount); infinityGridLayoutGroup.updateChildrenCallback = UpdateChildrenCallback; }
/// <summary> /// 产生代开房间的预置体,如果玩家关闭之后 /// </summary> void SpwanInsteadOpenRecord() { InsteadOpenRoomPanelData iorpd = GameData.Instance.InsteadOpenRoomPanelData; if (iorpd.isNoRecord) { NoRecord.gameObject.SetActive(true); } else { NoRecord.gameObject.SetActive(false); } if (!iorpd.isFirstSpwanInsteadRecord) { return; } iorpd.isFirstSpwanInsteadRecord = false; //删除玩家的之前的面板 InsteadOpenRecordMessage[] rooms = InsteadOpenRecord.transform.Find("Content").GetComponentsInChildren <InsteadOpenRecordMessage>(); if (rooms.Length > 0) { for (int i = 0; i < rooms.Length; i++) { Destroy(rooms[i].gameObject); } } InsteadOpenRecord.transform.Find("Content").GetComponent <GridLayoutGroup>().enabled = true; InsteadOpenRecord.transform.Find("Content").GetComponent <ContentSizeFitter>().enabled = true; int count = iorpd.RoomMessage.Count; Debug.LogError("count:" + count); if (count <= 0) { return; } if (count > 5) { for (int i = 0; i < 5; i++) { GameObject go = Instantiate(Resources.Load <GameObject>("Lobby/InsteadCreatRoomPanel/InsteadOpenRecord")); go.transform.SetParent(InsteadOpenRecord.transform.Find("Content")); go.transform.localEulerAngles = Vector3.zero; go.transform.localPosition = new Vector3(go.transform.localPosition.x, go.transform.localPosition.y, 0); go.transform.localScale = Vector3.one; go.name = "InsteadOpenRecord" + i; } //初始化数据列表; infinityGridLayoutGroup = InsteadOpenRecord.transform.Find("Content").GetComponent <InfinityGridLayoutGroup>(); infinityGridLayoutGroup.Init(); //Invoke("SetAmount", 0.1f); infinityGridLayoutGroup.SetAmount(iorpd.RoomMessage.Count); infinityGridLayoutGroup.updateChildrenCallback = UpdateChildrenCallback; } else { for (int i = 0; i < count; i++) { GameObject go = Instantiate(Resources.Load <GameObject>("Lobby/InsteadCreatRoomPanel/InsteadOpenRecord")); go.transform.SetParent(InsteadOpenRecord.transform.Find("Content")); go.transform.localEulerAngles = Vector3.zero; go.transform.localPosition = new Vector3(go.transform.localPosition.x, go.transform.localPosition.y, 0); go.transform.localScale = Vector3.one; go.name = "InsteadOpenRecord" + i; InsteadOpenRecordMessage room = go.GetComponent <InsteadOpenRecordMessage>(); room.RoomMessage = iorpd.RoomMessage[i]; room.index = i; room.ShowInsteadRecord(); } } }