1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 21:43:04 +08:00

Use old-style Enum.GetValues method for older than .NET 5

This commit is contained in:
Salman Ahmed 2021-01-24 00:55:45 +03:00
parent acfb2d2980
commit faa2210274

View File

@ -57,11 +57,15 @@ namespace osu.Game.Tests.Visual.UserInterface
}
};
#if NET5_0
var coverTypes = Enum.GetValues<BeatmapSetCoverType>();
#else
var coverTypes = Enum.GetValues(typeof(BeatmapSetCoverType)).Cast<BeatmapSetCoverType>();
#endif
for (int i = 0; i < 25; i++)
{
var coverType = coverTypes[i % coverTypes.Length];
var coverType = coverTypes.ElementAt(i);
var cover = new UpdateableBeatmapSetCover(coverType)
{