void OnSelect(object sender) { CSUI_PrcoessGrid Gird = sender as CSUI_PrcoessGrid; if (Gird != null) { } }
void OnDelete(object sender, int ItemId, int ProtoId) { CSUI_PrcoessGrid Gird = sender as CSUI_PrcoessGrid; if (Gird != null) { if (e_ItemRemove != null) { e_ItemRemove(this, ProtoId); } } }
void AddProcessItem(ProcessInfo Info) { GameObject obj = GameObject.Instantiate(m_ProcessGridPrefab) as GameObject; obj.transform.parent = mProcessGrid.transform; obj.transform.localScale = Vector3.one; obj.transform.localPosition = Vector3.zero; obj.SetActive(true); CSUI_PrcoessGrid Item = obj.GetComponent <CSUI_PrcoessGrid>(); //Item.SetIcon(Info.IconName); //Item.ItemID = Info.ItemId; Item.mProcessInfo = Info; Item.e_OnDeleteClick += OnDelete; Item.e_OnSelectClick += OnSelect; m_PrcoessItemList.Add(Item); mProcessGrid.repositionNow = true; }