/// <summary> /// Queue the time-action value pair. /// If the queue is longer than the defined capacity, /// it will start to dequeue. /// </summary> /// <param name="time"></param> /// <param name="action"></param> public void Add(float time, string action) { TimedAction t = new TimedAction(); t.time = time; t.action = action; DataSeries.Enqueue(t); LastTimedData = t; while (DataSeries.Count > Capacity) { DataSeries.Dequeue(); } }
/// <summary> /// Queue the time-data value pair. /// If the queue is longer than the defined capacity, /// it will start to dequeue. /// </summary> /// <param name="time"></param> /// <param name="value"></param> public void Add(float time, float value) { TimedValue t = new TimedValue(); t.value = value; t.time = time; DataSeries.Enqueue(t); LastTimedData = t; while (DataSeries.Count > Capacity) { DataSeries.Dequeue(); } }