1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 06:45:37 +08:00

Exclude interfaces from skinnable types

This commit is contained in:
smoogipoo 2021-05-17 18:16:09 +09:00
parent 7921930a92
commit 0d7a349500

View File

@ -57,7 +57,10 @@ namespace osu.Game.Skinning.Editor
Spacing = new Vector2(20) Spacing = new Vector2(20)
}; };
var skinnableTypes = typeof(OsuGame).Assembly.GetTypes().Where(t => typeof(ISkinnableDrawable).IsAssignableFrom(t)).ToArray(); var skinnableTypes = typeof(OsuGame).Assembly.GetTypes()
.Where(t => !t.IsInterface)
.Where(t => typeof(ISkinnableDrawable).IsAssignableFrom(t))
.ToArray();
foreach (var type in skinnableTypes) foreach (var type in skinnableTypes)
{ {