mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Use old-style Enum.GetValues method for older than .NET 5
This commit is contained in:
@ -57,11 +57,15 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if NET5_0
|
||||||
var coverTypes = Enum.GetValues<BeatmapSetCoverType>();
|
var coverTypes = Enum.GetValues<BeatmapSetCoverType>();
|
||||||
|
#else
|
||||||
|
var coverTypes = Enum.GetValues(typeof(BeatmapSetCoverType)).Cast<BeatmapSetCoverType>();
|
||||||
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < 25; i++)
|
for (int i = 0; i < 25; i++)
|
||||||
{
|
{
|
||||||
var coverType = coverTypes[i % coverTypes.Length];
|
var coverType = coverTypes.ElementAt(i);
|
||||||
|
|
||||||
var cover = new UpdateableBeatmapSetCover(coverType)
|
var cover = new UpdateableBeatmapSetCover(coverType)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user