public NormalTimeEventWrap(TimeTventType type, float time, System.Action <float, float> update = null, System.Action finish = null) { this.type = type; totalTime = time; lifeTime = totalTime; if (update != null) { updateList.Add(update); } if (finish != null) { finishList.Add(finish); } TimeEventMgr.Instance.add(this); }
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); }