public Cell CellForRow(ListView listView, int row) { Cell cell = listView.CellForReuseIndentify("cell"); if (cell == null) { cell = new Cell(listView); cell.identify = "cell"; GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("ElementInstanceMineObj"); cell.content = instantiate2Prefab; ElementInstanceMineObj component = instantiate2Prefab.GetComponent <ElementInstanceMineObj>(); component.BtnGet.onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtnGet); } MineInfo mineInfo = ElementInstanceManager.Instance.m_mineInfoRes.mineInfos.get_Item(row); ElementInstanceMineObj component2 = cell.content.GetComponent <ElementInstanceMineObj>(); component2.SetUI(mineInfo, row); return(cell); }
private void OnClickBtnGet(GameObject sender) { ElementInstanceMineObj component = sender.get_transform().get_parent().get_parent().GetComponent <ElementInstanceMineObj>(); ElementInstanceManager.Instance.SendAcceptDebrisReq(component.blockID); }