示例#1
0
        public static GTimelineStyle GetStyle(string styleName)
        {
            GTimelineStyle s = null;

            mStyleDic.TryGetValue(styleName, out s);
            return(s);
        }
示例#2
0
        public static GTimelineStyle CreatDefault(string name)
        {
            GTimelineStyle creatNew = new GTimelineStyle();

            creatNew.name  = name;
            creatNew.range = new FrameRange(0, GTimelineStyle.DEFAULT_FRAMES_PER_SECOND * GTimelineStyle.DEFAULT_LENGTH);
            return(creatNew);
        }
示例#3
0
        public static GTimelineStyle DeSerialize(string name, string json)
        {
            GTimelineStyle evt = JsonUtility.FromJson(json, typeof(GTimelineStyle)) as GTimelineStyle;

            evt.name = name;
            GTimelineFactory.Deserialize(evt.styles, evt.jsons, evt.types);
            return(evt);
        }
示例#4
0
        public static GTimeline CreatTimeline(GTimelineStyle style)
        {
            if (style == null)
            {
                return(null);
            }
            GTimeline tl = GEvent.Create(null, style, null) as GTimeline;

            tl.Init();
            return(tl);
        }
示例#5
0
        public static GTimeline CreatTimeline(string styleName)
        {
            GTimelineStyle s = GetStyle(styleName);

            return(CreatTimeline(s));
        }