Exemplo n.º 1
0
    public virtual ViewList <Item, View> Init(ViewBuilderDelegate view_builder, GetTransformForItem _getTarget, List <Item> list, Action <View> RemoveCallback, int _viewitemcount)
    {
        Init(view_builder, _getTarget, RemoveCallback, _viewitemcount);
        UpdateList(list);

        return(this);
    }
Exemplo n.º 2
0
 public virtual ViewList <Item, View> Init(ViewBuilderDelegate view_builder, GetTransformForItem _getTarget, Action <View> _removeCallback, int _viewitemcount)
 {
     if (views != null)
     {
         foreach (var pair in views)
         {
             GameObject.Destroy(pair.Value.gameObject);
         }
         //  MDebug.Log("clear view list");
         views = null;
     }
     RemoveViewCallback = _removeCallback;
     GetTarget          = _getTarget;
     MakeView           = view_builder;
     ViewItemsCount     = _viewitemcount;
     return(this);
 }