More general refactorings.

This commit is contained in:
smoogipooo
2017-03-10 14:42:14 +09:00
parent 5f440d0b53
commit 58a88cc715
11 changed files with 235 additions and 28 deletions

View File

@ -21,13 +21,10 @@ namespace osu.Game.Modes
public abstract class Ruleset
{
public abstract KeyCounter[] CreateGameplayKeys { get; }
private static ConcurrentDictionary<PlayMode, Type> availableRulesets = new ConcurrentDictionary<PlayMode, Type>();
public static IEnumerable<PlayMode> PlayModes => availableRulesets.Keys;
public virtual IEnumerable<BeatmapStatistic> GetBeatmapStatistics(WorkingBeatmap beatmap) => new BeatmapStatistic[] { };
public abstract IEnumerable<Mod> GetModsFor(ModType type);
@ -48,6 +45,8 @@ namespace osu.Game.Modes
public abstract string Description { get; }
public abstract IEnumerable<KeyCounter> CreateGameplayKeys();
public virtual Score CreateAutoplayScore(Beatmap beatmap) => null;
public static Ruleset GetRuleset(PlayMode mode)