public void add(TimeEventWrap wrap) { if (wrap == null) { return; } List <TimeEventWrap> wrapList = null; switch (wrap.type) { case TimeTventType.Normal: wrapList = normalList; break; case TimeTventType.Server: wrapList = serverList; break; case TimeTventType.Client: wrapList = clientList; break; default: break; } if (wrapList != null && !wrapList.Contains(wrap)) { wrapList.Add(wrap); } }
public TimeEventWrap SetTimeWrap(TimeTventType type, float time, System.Action <float, float> update = null, System.Action finish = null) { TimeEventWrap wrap = null; switch (type) { case TimeTventType.Normal: wrap = new NormalTimeEventWrap(type, time, update, finish); break; //case TimeTventType.Server: // wrap = new ServerTimeEventWrap(type, time, update, finish); // break; //case TimeTventType.Client: //wrap = new ClientTimeEventWrap(type, time, update, finish); //break; default: break; } return(wrap); }
public void DeleteWrap(TimeEventWrap wrap) { remove(wrap); }