private void AddEventToList(List <TimingEvent> list, TrackEventDelegate newEvent, float eventTime) { if (IsValidEventTime(eventTime)) { list.Add(new TimingEvent(newEvent, eventTime)); } else { InvalidEventTimeGiven(eventTime); } }
public virtual void AddEventAtTime(TrackEventDelegate newEvent, float eventTime) { AddEventToList(momentaryEvents, newEvent, eventTime); }
public void AddEventAtTimeRemaining(TrackEventDelegate newEvent, float eventTimeRemaining) { float eventTime = GetTrackLength() - eventTimeRemaining; AddEventAtTime(newEvent, eventTime); }