public static GTimelineStyle GetStyle(string styleName)
        {
            GTimelineStyle s = null;

            mStyleDic.TryGetValue(styleName, out s);
            return(s);
        }
Beispiel #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);
        }
        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);
        }
        public static GTimeline CreatTimeline(GTimelineStyle style)
        {
            if (style == null)
            {
                return(null);
            }
            GTimeline tl = GEvent.Create(null, style, null) as GTimeline;

            tl.Init();
            return(tl);
        }
        public static GTimeline CreatTimeline(string styleName)
        {
            GTimelineStyle s = GetStyle(styleName);

            return(CreatTimeline(s));
        }