public void show(INameObj dropObj, string name) { if (!dItem.ContainsKey(dropObj)) { DropItemUI item; if (lPool.Count == 0) { GameObject temp = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_dropItemUI"); GameObject go = GameObject.Instantiate(temp) as GameObject; go.transform.SetParent(dropItemUILayer, false); item = new DropItemUI(go.transform); } else { item = lPool[0]; item.visiable = true; lPool.RemoveAt(0); } item.refresh(dropObj, name); lItem.Add(item); dItem[dropObj] = item; if (dropObj is DropItem) { item.refresShowName(showTime); } } else { dItem[dropObj].refresh(dropObj, name); dItem[dropObj].refresShowName(showTime); } }
public void hideOne(INameObj dropItem) { if (!dItem.ContainsKey(dropItem)) { return; } DropItemUI item = dItem[dropItem]; item.clear(); }
public void hideOne(INameObj dropItem) { bool flag = !this.dItem.ContainsKey(dropItem); if (!flag) { DropItemUI dropItemUI = this.dItem[dropItem]; dropItemUI.clear(); } }
public void hide(INameObj dropItem) { if (!dItem.ContainsKey(dropItem)) { return; } DropItemUI item = dItem[dropItem]; item.visiable = false; item.clear(); dItem.Remove(dropItem); lItem.Remove(item); lPool.Add(item); }
public void hide(INameObj dropItem) { bool flag = !this.dItem.ContainsKey(dropItem); if (!flag) { DropItemUI dropItemUI = this.dItem[dropItem]; dropItemUI.visiable = false; dropItemUI.clear(); this.dItem.Remove(dropItem); this.lItem.Remove(dropItemUI); this.lPool.Add(dropItemUI); } }
public void show(INameObj dropObj, string name) { bool flag = !this.dItem.ContainsKey(dropObj); if (flag) { bool flag2 = this.lPool.Count == 0; DropItemUI dropItemUI; if (flag2) { GameObject original = Resources.Load("prefab/dropItemUI") as GameObject; GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original); gameObject.transform.SetParent(this.dropItemUILayer, false); dropItemUI = new DropItemUI(gameObject.transform); } else { dropItemUI = this.lPool[0]; dropItemUI.visiable = true; this.lPool.RemoveAt(0); } dropItemUI.refresh(dropObj, name); this.lItem.Add(dropItemUI); this.dItem[dropObj] = dropItemUI; bool flag3 = dropObj is DropItem; if (flag3) { dropItemUI.refresShowName(this.showTime); } } else { this.dItem[dropObj].refresh(dropObj, name); this.dItem[dropObj].refresShowName(this.showTime); } }
public void removeDropItem(DropItemUI diu) { lItem.Remove(diu); }