protected bool GetUnuseTreeNode(out UWarGoodsStoreTreeNodeComponent _nUnuseNode)
        {
            UWarGoodsStoreTreeNodeComponent node;

            //先从缓冲中取
            if (UnuseTreeNodeList.Count > 0)
            {
                node = UnuseTreeNodeList[UnuseTreeNodeList.Count - 1];
                UnuseTreeNodeList.Remove(node);
                UseTreeNodeList.Add(node);
                _nUnuseNode = node;

                return(true);
            }
            //没有的话实例化一个出来
            if (TreeNodeComponentPrefabRes == null)
            {
                Trace.LogError("没有节点预制体,不能实例化物品合成树节点");
                _nUnuseNode = null;
                return(false);
            }

            InstantiateTreeNode();

            node = UnuseTreeNodeList[UnuseTreeNodeList.Count - 1];
            UnuseTreeNodeList.Remove(node);
            UseTreeNodeList.Add(node);
            _nUnuseNode = node;

            return(true);
        }
        protected void InstantiateTreeNode()
        {
            UWarGoodsStoreTreeNodeComponent newNode = TreeNodeComponentPrefabRes.InstanceMainRes <UWarGoodsStoreTreeNodeComponent>();

            newNode.transform.SetParent(m_UnuseTreeNodeContainner, false);
            UnuseTreeNodeList.Add(newNode);

            newNode.SetVisible(false);
        }
        protected bool GetUnuseTreeNodeEx(out UWarGoodsStoreTreeNodeComponent _nUnuseNode)
        {
            bool res = GetUnuseTreeNode(out _nUnuseNode);

            _nUnuseNode.transform.SetParent(GetTransform, false);
            _nUnuseNode.onSelect.AddListener(OnMobaGoodsSelected);
            _nUnuseNode.onDeselect.AddListener(OnAllGoodsOnDeselect);
            _nUnuseNode.onRightClick.AddListener(OnMobaGoodsBuy);
            _nUnuseNode.onDoubleClick.AddListener(OnMobaGoodsBuy);
            _nUnuseNode.SetVisible(true);
            return(res);
        }
 public void Clear()
 {
     GoodsDepth         = 0;
     GoodsChildCount    = 0;
     ParentNode         = null;
     GoodsItem          = null;
     GoodsNodeComponent = null;
     if (ChildsNodeList != null)
     {
         ChildsNodeList.Clear();
     }
     ParentNodeWidth = 0;
 }