mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:12:56 +08:00
Remove usages of EF internals
This commit is contained in:
parent
514c9f1eef
commit
45af796943
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.EntityFrameworkCore.Internal;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio.Track;
|
using osu.Framework.Audio.Track;
|
||||||
@ -153,7 +153,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private IReadOnlyList<TimingControlPoint> timingPoints => Beatmap.Value.Beatmap.ControlPointInfo.TimingPoints;
|
private List<TimingControlPoint> timingPoints => Beatmap.Value.Beatmap.ControlPointInfo.TimingPoints.ToList();
|
||||||
|
|
||||||
private TimingControlPoint getNextTimingPoint(TimingControlPoint current)
|
private TimingControlPoint getNextTimingPoint(TimingControlPoint current)
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.EntityFrameworkCore.Internal;
|
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
@ -88,7 +87,17 @@ namespace osu.Game.Screens.Edit
|
|||||||
if (direction < 0 && timingPoint.Time == CurrentTime)
|
if (direction < 0 && timingPoint.Time == CurrentTime)
|
||||||
{
|
{
|
||||||
// When going backwards and we're at the boundary of two timing points, we compute the seek distance with the timing point which we are seeking into
|
// When going backwards and we're at the boundary of two timing points, we compute the seek distance with the timing point which we are seeking into
|
||||||
int activeIndex = ControlPointInfo.TimingPoints.IndexOf(timingPoint);
|
int activeIndex = -1;
|
||||||
|
|
||||||
|
for (int i = 0; i < ControlPointInfo.TimingPoints.Count; i++)
|
||||||
|
{
|
||||||
|
if (ControlPointInfo.TimingPoints[i] == timingPoint)
|
||||||
|
{
|
||||||
|
activeIndex = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while (activeIndex > 0 && CurrentTime == timingPoint.Time)
|
while (activeIndex > 0 && CurrentTime == timingPoint.Time)
|
||||||
timingPoint = ControlPointInfo.TimingPoints[--activeIndex];
|
timingPoint = ControlPointInfo.TimingPoints[--activeIndex];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user