Remove callback parameters on states.

This commit is contained in:
2023-01-03 12:09:16 +08:00
parent 7c77ba83f8
commit 723ec937ad
4 changed files with 23 additions and 28 deletions

View File

@@ -56,7 +56,7 @@ namespace Cryville.Crtr.Event {
}
}
public override void ForwardOnceToTime(double toTime, Action<ChartEvent> callback) {
public override void ForwardOnceToTime(double toTime) {
double toBeat = Math.Round(beat + (toTime - Time) * tempo / 60f, 6);
if (EventId >= events.Count)
goto return_ahead;
@@ -84,7 +84,6 @@ namespace Cryville.Crtr.Event {
}
stampedEvents.Add(sev);
if (ev.Priority >= 0) {
if (callback != null) callback(ev);
flag = true;
}
if (ev is Chart.Signature) {
@@ -93,12 +92,10 @@ namespace Cryville.Crtr.Event {
}
EventId++;
}
if (callback != null && !flag) callback(batch.First());
return;
return_ahead:
Time = toTime;
beat = toBeat;
if (callback != null) callback(null);
}
IOrderedEnumerable<ChartEvent> GetEventBatch() {