public void ScheduleTimeEvent(float time, string tag, TimeEventSchedulerDelegate onStartAction, TimeEventSchedulerDelegate onUpdateAction, TimeEventSchedulerDelegate onFinishAction, Dictionary <string, object> userInfo) { TimeEvent tE = new TimeEvent(time + realTime, tag, onStartAction, onUpdateAction, onFinishAction, userInfo); tE.startTime = realTime; if (tE != null) { Schedule(tE); } }
public TimeEvent(float riseTime, string tagName, TimeEventSchedulerDelegate onStartAction, TimeEventSchedulerDelegate onUpdateAction, TimeEventSchedulerDelegate onFinishAction, Dictionary <string, object> info) { if (string.IsNullOrEmpty(tagName)) { Debug.LogWarning("The tag name should not be null!"); return; } //TimeEvent(tagName); tag = tagName; timeToRise = riseTime; onStart = onStartAction; onUpdate = onUpdateAction; onFinish = onFinishAction; userInfo = info; }