Beispiel #1
0
            public TreeNode Add(GTimelineStyle style, int depth)
            {
                depth++;
                if (depth > 10)
                {
                    Debug.LogError("超出深度上限=10");
                    return(null);
                }
                TreeNode d = Add(style, style.name);

                d.isOpen = false;
                for (int i = 0; i < style.styles.Count; i++)
                {
                    GEventStyle evt = style.styles[i];
                    d.AddEventData(evt, depth);
                }
                return(d);
            }
Beispiel #2
0
            public TreeNode AddEventData(GEventStyle data, int depth)
            {
                if (data == null)
                {
                    return(null);
                }
                TreeNode node = null;

                if (data is GPlayTimelineStyle)
                {
                    string tName = (data as GPlayTimelineStyle).styleRes;
                    if (!object.Equals(this.parent, null) && tName == this.parent.name)
                    {
                        Debug.LogError("错误的名字,timeLineName不能是自己");
                        return(null);
                    }
                    if (string.IsNullOrEmpty(tName) || !allDic.ContainsKey(tName))
                    {
                        node = Add(data, data.typeName + "[" + tName + "]");
                        return(node);
                    }
                    GTimelineStyle ts = allDic[tName];
                    node = Add(data, data.typeName + "[" + tName + "]");
                    node.Add(ts, depth);
                }
                else
                {
                    node = Add(data, data.typeName);
                }
                for (int i = 0; i < data.styles.Count; i++)
                {
                    GEventStyle evt = data.styles[i];
                    node.AddEventData(evt, depth);
                }
                return(node);
            }
Beispiel #3
0
            public TreeNode AddEventData(GEventStyle data, int depth)
            {
                if (data == null)
                {
                    return(null);
                }
                TreeNode node = null;

                //if (data is GTriggerTimelineStyle)
                //{
                //    string tName = (data as GTriggerTimelineStyle).styleRes;
                //    if (!object.Equals(this.parent, null) && tName == this.parent.name)
                //    {
                //        Debug.LogError("错误的名字,timeLineName不能是自己");
                //        return null;
                //    }
                //    if(string.IsNullOrEmpty(tName) || !allDic.ContainsKey(tName))
                //    {
                //        node = Add(data, data.Attr.name + "[" + tName + "]");
                //        return node;
                //    }
                //    GTimelineStyle ts = allDic[tName];
                //    node = Add(data, data.Attr.name + "[" + tName + "]");
                //    node.Add(ts, depth);
                //}
                //else
                //{
                node = Add(data, data.Attr.name);
                //}
                for (int i = 0; i < data.styles.Count; i++)
                {
                    GEventStyle evt = data.styles[i];
                    node.AddEventData(evt, depth);
                }
                return(node);
            }