public void Init(InventoryPanel panel) { m_Panel = panel; for (int i = 0; i < m_NavIcons.Count; i++) { m_NavIcons[i].Init((InventoryType)i); int index = i; m_NavIcons[i].BtnBg.onClick.AddListener(() => { if (m_CurInventoryType == (InventoryType)index) { return; } Showpage((InventoryType)index); }); } m_Scroll.SetCellRenderer(OnCellRenderer); Showpage(InventoryType.Weapon); }
public void Init(InventoryPanel panel) { EventSystem.S.Register(EventID.OnRoleEquip, OnEventHandler); }