public ScheduleManager SchedulePeriodicEvent(Event e, ICollection <Entity> entities, float timeInSec) { PeriodicEventTask task = new PeriodicEventTask(e, this.engineService, entities, timeInSec); this.periodicTasks.AddLast(task); return(task); }
private void UpdatePeriodicTasks(double time) { LinkedListNode <PeriodicEventTask> next; for (LinkedListNode <PeriodicEventTask> node = this.periodicTasks.First; node != null; node = next) { PeriodicEventTask task = node.Value; next = node.Next; if (task.IsCanceled()) { this.periodicTasks.Remove(node); } else { task.Update(time); } } }