Exemplo n.º 1
0
        /// <summary>
        /// 更新节点信息描述
        /// </summary>
        /// <param name="node"></param>
        private static void TryUpdateNodeDescribe(Graph.PanelNodeBase node)
        {
            var guid      = node.nodeInfo.guid;
            var behaivers = GetBehaiversFromGUID(guid);

            if (behaivers != null && behaivers.Length > 0)
            {
                foreach (var item in behaivers)
                {
                    var list = AnalysisBehaiver(item);
                    if (list != null)
                    {
                        for (int i = 0; i < list.Count; i++)
                        {
                            if (node.nodedescribe.Count < i + 1)
                            {
                                node.nodedescribe.Add(list[i]);
                            }

                            else
                            {
                                if (!string.IsNullOrEmpty(list[i]))
                                {
                                    node.nodedescribe[i] = list[i];
                                }
                            }
                        }
                    }
                }
            }
        }
 private void OnEnable()
 {
     panelNode  = target as Graph.PanelNodeBase;
     itemDrawer = new ComponentItemDrawer();
     InitPanelPortDrawer();
     InitAnimPlayers();
     OnPrefabChanged();
     InitComponentList();
 }
 private void OnEnable()
 {
     panelNode  = target as Graph.PanelNodeBase;
     itemDrawer = new ComponentItemDrawer();
     if (panelNode.rule == null)
     {
         panelNode.rule = new GenCodeRule(Setting.defultNameSpace);
     }
     InitPanelPortDrawer();
     InitAnimPlayers();
     OnPrefabChanged();
     InitComponentList();
 }