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:
parent
acfb2d2980
commit
faa2210274
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user