/// <summary> /// 移除可点击元素 /// </summary> /// <param name="arg0"></param> protected void OnRemoveElement(ISupportElement arg0) { if (arg0 is ActionItem) { var element = arg0 as ActionItem; elementPool.ScureRemove(element); } }
/// <summary> /// 移除可点击元素 /// </summary> /// <param name="arg0"></param> protected void OnRemoveElement(ISupportElement arg0) { if (SupportType(arg0.GetType()) && itemList.Contains(arg0.Name)) { if (elementPool.Contains(arg0)) { elementPool.ScureRemove(arg0); } } }
/// <summary> /// 移除可点击元素 /// </summary> /// <param name="arg0"></param> protected void OnRemoveElement(ISupportElement arg0) { if (arg0 is T && itemList.Contains(arg0.Name)) { if (elementPool.Contains((T)arg0)) { elementPool.ScureRemove((T)arg0); } } }
protected override void OnRemoveElement(ISupportElement arg0) { if (arg0.IsRuntimeCreated) { var old = hoders.Find(x => x.elementName == arg0.Name); if (old != null) { supportPool.ScureRemove(arg0); } } }
/// <summary> /// 移除可点击元素 /// </summary> /// <param name="arg0"></param> protected void OnRemoveElement(ISupportElement arg0) { if (arg0.GetType() == type && arg0.Name == elementName) { var element = arg0 as ActionItem; if (elementPool.Contains(element)) { elementPool.ScureRemove(element); } } }
/// <summary> /// 注销 /// </summary> /// <param name="arg0"></param> protected override void OnRemoveElement(ISupportElement arg0) { if (arg0.IsRuntimeCreated && arg0 is LinkItem) { var linkItem = arg0 as LinkItem; if (linkPool.Contains(linkItem)) { linkPool.ScureRemove(linkItem); } } }
/// <summary> /// 清除所有动态创建的元素 /// </summary> public void ClearExtraCreated() { var list = rutimeCreatedList.ToArray(); foreach (var item in list) { if (TryDestroyElement(item)) { rutimeCreatedList.ScureRemove(item); } } }
/// <summary> /// 移除Eelement /// </summary> /// <param name="item"></param> public void RemoveElement(ISupportElement item) { if (elementList.Contains(item)) { elementList.ScureRemove(item); if (onRemoveElememt != null) { onRemoveElememt.Invoke(item); } } }
/// <summary> /// 注销 /// </summary> /// <param name="arg0"></param> protected override void OnRemoveElement(ISupportElement arg0) { if (arg0.IsRuntimeCreated && arg0 is PlaceElement) { if (arg0.Name == Name) { var placeItem = arg0 as PlaceElement; if (elementPool.Contains(placeItem)) { elementPool.ScureRemove(placeItem); } } } }
internal void RemoveRunTimeElements(IList <RunTimePrefabItem> elements) { foreach (var item in elements) { if (item == null && item.prefab) { continue; } var element = item.prefab.GetComponent <ISupportElement>(); if (element != null && runTimeElementPrefabs.Contains(element)) { runTimeElementPrefabs.ScureRemove(element); } } }