public static GTimeline GetActiveTimeline(int id) { GTimeline tl = null; mActiveDic.TryGetValue(id, out tl); return(tl); }
public static GEvent Create(GTimeline root, GEventStyle data, GEvent parent) { GEvent evt = GTimelineFactory.GetEvent(data); if (root == null) { if (evt is GTimeline) { root = evt as GTimeline; } else { return(null); } } evt.mParent = parent; evt.root = root; evt.mStyle = data; evt.frameRange = data.range; for (int i = 0; i < data.styles.Count; i++) { GEvent child = GEvent.Create(root, data.styles[i], evt); child.SetId(i); evt._events.Add(child); } return(evt); }
static void actionOnGet(object obj) { GTimeline tl = (GTimeline)obj; int id = (int)mIdGenerator.generateNewId(); tl.SetId(id); mActiveDic.Add(id, tl); }
public static void ReleaseTimeline(GTimeline tl) { if (tl == null) { return; } tl.Destroy(); }
public static void ReleaseTimeline(GTimeline tl) { if (tl == null) { return; } tl.Destroy(); GTimelineFactory.ReleaseEvent(tl); }
public static GTimeline CreatTimeline(GTimelineStyle style) { if (style == null) { return(null); } GTimeline tl = GEvent.Create(null, style, null) as GTimeline; tl.Init(); return(tl); }
static void actionOnRelease(object obj) { GTimeline tl = (GTimeline)obj; mActiveDic.Remove(tl.id); }