Beispiel #1
0
    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);
        }
    }
Beispiel #2
0
 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;
 }