/// <summary> /// 释放LuaSimpleList,移除所有LuaItem /// </summary> /// <param name="eventHandler"></param> public static void ReleaseLuaSimpleList(LuaSimpleList eventHandler) { eventHandler.count = 0; eventHandler.Init(); }
/// <summary> /// 强制移除Item /// </summary> /// <param name="eventHandler"></param> /// <param name="item"></param> public static void DynamicRemoveItem(LuaSimpleList eventHandler, LuaItem item) { eventHandler.DynamicRemoveItem(item); }
public static void UnBindOnItemAdd(LuaSimpleList eventHandler) { eventHandler.onItemAdd = null; }
/// <summary> /// 解绑Item移除 /// </summary> /// <param name="eventHandler"></param> /// <param name="onItemRemove"></param> public static void UnBindOnItemRemove(LuaSimpleList eventHandler, Action <LuaItem> onItemRemove) { eventHandler.onItemRemove = null; }
/// <summary> /// 绑定Item添加事件 /// </summary> public static void BindOnItemAdd(LuaSimpleList eventHandler, Action <LuaItem> onItemAdd) { eventHandler.onItemAdd = onItemAdd; }